Amfphp_Core_Amf_Deserializer::readAmf3String PHP Method

readAmf3String() protected method

readString
protected readAmf3String ( ) : string
return string
    protected function readAmf3String()
    {
        $strref = $this->readAmf3Int();
        if (($strref & 0x1) == 0) {
            $strref = $strref >> 1;
            if ($strref >= count($this->storedStrings)) {
                throw new Amfphp_Core_Exception('Undefined string reference: ' . $strref, E_USER_ERROR);
                return false;
            }
            return $this->storedStrings[$strref];
        } else {
            $strlen = $strref >> 1;
            $str = '';
            if ($strlen > 0) {
                $str = $this->readBuffer($strlen);
                $this->storedStrings[] = $str;
            }
            return $str;
        }
    }

Usage Example

コード例 #1
0
 /**
  * read amf3 string
  * @return string
  */
 public function readAmf3String()
 {
     return parent::readAmf3String();
 }