public function readString()
    {
        $stringReference = $this->readInteger();

        //Check if this is a reference string
        if (($stringReference & 0x01) == 0) {
            // reference string
            $stringReference = $stringReference >> 1;
            if ($stringReference >= count($this->_referenceStrings)) {
                require_once 'Zend/Amf/Exception.php';
                throw new Zend_Amf_Exception('Undefined string reference: ' . $stringReference);
            }
            // reference string found
            return $this->_referenceStrings[$stringReference];
        }

        $length = $stringReference >> 1;
        if ($length) {
            $string = $this->_stream->readBytes($length);
            $this->_referenceStrings[] = $string;
        } else {
            $string = "";
        }
        return $string;
    }
public function readString()
    {
        $stringReference = $this->readInteger();

        //Check if this is a reference string
        if (($stringReference & 0x01) == 0) {
            // reference string
            $stringReference = $stringReference >> 1;
            if ($stringReference >= count($this->_referenceStrings)) {
                require_once 'Zend/Amf/Exception.php';
                throw new Zend_Amf_Exception('Undefined string reference: ' . $stringReference);
            }
            // reference string found
            return $this->_referenceStrings[$stringReference];
        }

        $length = $stringReference >> 1;
        if ($length) {
            $string = $this->_stream->readBytes($length);
            $this->_referenceStrings[] = $string;
        } else {
            $string = "";
        }
        return $string;
    }
public function readString ( ) { $ stringReference = $ this -> readInteger ( ) ; //Check if this is a reference string if ( ( $ stringReference & 0x01 ) == 0 ) { // reference string $ stringReference = $ stringReference >> 1 ; if ( $ stringReference >= count ( $ this -> _referenceStrings ) ) { require_once 'Zend/Amf/Exception.php' ; throw new Zend_Amf_Exception ( 'Undefined string reference: ' . $ stringReference ) ; } // reference string found return $ this -> _referenceStrings [ $ stringReference ] ; } $ length = $ stringReference >> 1 ; if ( $ length ) { $ string = $ this -> _stream -> readBytes ( $ length ) ; $ this -> _referenceStrings [ ] = $ string ; } else { $ string = "" ; } return $ string ; }
Read and deserialize a string

Strings can be sent as a reference to a previously
occurring String by using an index to the implicit string reference table.
Strings are encoding using UTF-8 - however the header may either
describe a string literal or a string reference.

- string = 0x06 string-data
- string-data = integer-data [ modified-utf-8 ]
- modified-utf-8 = *OCTET

@return String
Read and deserialize a string