library/Rediska/PubSub/Channel.php
protected function _getResponseFromConnection(Rediska_Connection $connection)
    {
        $response = Rediska_Connection_Exec::readResponseFromConnection($connection);

        if ($response === null || $response === true) {
            return null;
        }

        list($type, $channel, $body) = $response;

        if ($this->getRediska()->getOption('namespace') !== '' && strpos($channel, $this->getRediska()->getOption('namespace')) === 0) {
            $channel = substr($channel, strlen($this->getRediska()->getOption('namespace')));
        }

        switch ($type) {
            case self::SUBSCRIBE:
                return new Rediska_PubSub_Response_Subscribe($connection, $channel);

            case self::UNSUBSCRIBE:
                return new Rediska_PubSub_Response_Unsubscribe($connection, $channel);

            case self::MESSAGE:
                $message = $this->getRediska()->getSerializer()->unserialize($body);

                return new Rediska_PubSub_Response_Message($connection, $channel, $message);

            default:
                throw new Rediska_PubSub_Response_Exception('Unknown reponse type: ' . $type);
        }
    }
protected function _getResponseFromConnection(Rediska_Connection $connection)
    {
        $response = Rediska_Connection_Exec::readResponseFromConnection($connection);

        if ($response === null || $response === true) {
            return null;
        }

        list($type, $channel, $body) = $response;

        if ($this->getRediska()->getOption('namespace') !== '' && strpos($channel, $this->getRediska()->getOption('namespace')) === 0) {
            $channel = substr($channel, strlen($this->getRediska()->getOption('namespace')));
        }

        switch ($type) {
            case self::SUBSCRIBE:
                return new Rediska_PubSub_Response_Subscribe($connection, $channel);

            case self::UNSUBSCRIBE:
                return new Rediska_PubSub_Response_Unsubscribe($connection, $channel);

            case self::MESSAGE:
                $message = $this->getRediska()->getSerializer()->unserialize($body);

                return new Rediska_PubSub_Response_Message($connection, $channel, $message);

            default:
                throw new Rediska_PubSub_Response_Exception('Unknown reponse type: ' . $type);
        }
    }
Get response from connection

@param Rediska_Connection $connection
@return Rediska_PubSub_Response_Abstract