public function readMessage(Zend_Amf_Parse_InputStream $stream)
    {
        $clientVersion = $stream->readUnsignedShort();
        if (($clientVersion != Zend_Amf_Constants::AMF0_OBJECT_ENCODING)
            && ($clientVersion != Zend_Amf_Constants::AMF3_OBJECT_ENCODING)
            && ($clientVersion != Zend_Amf_Constants::FMS_OBJECT_ENCODING)
        ) {
            require_once 'Zend/Amf/Exception.php';
            throw new Zend_Amf_Exception('Unknown Player Version ' . $clientVersion);
        }

        $this->_bodies  = array();
        $this->_headers = array();
        $headerCount    = $stream->readInt();

        // Iterate through the AMF envelope header
        while ($headerCount--) {
            $this->_headers[] = $this->readHeader();
        }

        // Iterate through the AMF envelope body
        $bodyCount = $stream->readInt();
        while ($bodyCount--) {
            $this->_bodies[] = $this->readBody();
        }

        return $this;
    }
public function readMessage(Zend_Amf_Parse_InputStream $stream)
    {
        $clientVersion = $stream->readUnsignedShort();
        if (($clientVersion != Zend_Amf_Constants::AMF0_OBJECT_ENCODING)
            && ($clientVersion != Zend_Amf_Constants::AMF3_OBJECT_ENCODING)
            && ($clientVersion != Zend_Amf_Constants::FMS_OBJECT_ENCODING)
        ) {
            require_once 'Zend/Amf/Exception.php';
            throw new Zend_Amf_Exception('Unknown Player Version ' . $clientVersion);
        }

        $this->_bodies  = array();
        $this->_headers = array();
        $headerCount    = $stream->readInt();

        // Iterate through the AMF envelope header
        while ($headerCount--) {
            $this->_headers[] = $this->readHeader();
        }

        // Iterate through the AMF envelope body
        $bodyCount = $stream->readInt();
        while ($bodyCount--) {
            $this->_bodies[] = $this->readBody();
        }

        return $this;
    }
public function readMessage ( Zend_Amf_Parse_InputStream $ stream ) { $ clientVersion = $ stream -> readUnsignedShort ( ) ; if ( ( $ clientVersion != Zend_Amf_Constants :: AMF0_OBJECT_ENCODING ) && ( $ clientVersion != Zend_Amf_Constants :: AMF3_OBJECT_ENCODING ) && ( $ clientVersion != Zend_Amf_Constants :: FMS_OBJECT_ENCODING ) ) { require_once 'Zend/Amf/Exception.php' ; throw new Zend_Amf_Exception ( 'Unknown Player Version ' . $ clientVersion ) ; } $ this -> _bodies = array ( ) ; $ this -> _headers = array ( ) ; $ headerCount = $ stream -> readInt ( ) ; // Iterate through the AMF envelope header while ( $ headerCount -- ) { $ this -> _headers [ ] = $ this -> readHeader ( ) ; } // Iterate through the AMF envelope body $ bodyCount = $ stream -> readInt ( ) ; while ( $ bodyCount -- ) { $ this -> _bodies [ ] = $ this -> readBody ( ) ; } return $ this ; }
Takes the raw AMF input stream and converts it into valid PHP objects

@param  Zend_Amf_Parse_InputStream
@return Zend_Amf_Request
Takes the raw AMF input stream and converts it into valid PHP objects