public function writeString(&$string)
    {
        $len = strlen($string);
        if(!$len){
            $this->writeInteger(0x01);
            return $this;
        }

        $ref = array_key_exists($string, $this->_referenceStrings) 
             ? $this->_referenceStrings[$string] 
             : false;
        if ($ref === false){
            $this->_referenceStrings[$string] = count($this->_referenceStrings);
            $this->writeBinaryString($string);
        } else {
            $ref <<= 1;
            $this->writeInteger($ref);
        }

        return $this;
    }
public function writeString(&$string)
    {
        $len = strlen($string);
        if(!$len){
            $this->writeInteger(0x01);
            return $this;
        }

        $ref = array_key_exists($string, $this->_referenceStrings) 
             ? $this->_referenceStrings[$string] 
             : false;
        if ($ref === false){
            $this->_referenceStrings[$string] = count($this->_referenceStrings);
            $this->writeBinaryString($string);
        } else {
            $ref <<= 1;
            $this->writeInteger($ref);
        }

        return $this;
    }
public function writeString ( & $ string ) { $ len = strlen ( $ string ) ; if ( ! $ len ) { $ this -> writeInteger ( 0x01 ) ; return $ this ; } $ ref = array_key_exists ( $ string , $ this -> _referenceStrings ) ? $ this -> _referenceStrings [ $ string ] : false ; if ( $ ref === false ) { $ this -> _referenceStrings [ $ string ] = count ( $ this -> _referenceStrings ) ; $ this -> writeBinaryString ( $ string ) ; } else { $ ref <<= 1 ; $ this -> writeInteger ( $ ref ) ; } return $ this ; }
Send string to output stream

@param  string $string
@return Zend_Amf_Parse_Amf3_Serializer
Send string to output stream