Amfphp_Core_Amf_Deserializer::readObject PHP Method

readObject() protected method

readObject reads the name/value properties of the amf Packet and converts them into their equivilent php representation
protected readObject ( ) : Object
return Object The php object filled with the data
    protected function readObject()
    {
        $ret = new stdClass();
        $this->amf0storedObjects[] =& $ret;
        $key = $this->readUTF();
        for ($type = $this->readByte(); $type != 9; $type = $this->readByte()) {
            $val = $this->readData($type);
            // grab the value
            $ret->{$key} = $val;
            // save the name/value pair in the object
            $key = $this->readUTF();
            // get the next name
        }
        return $ret;
    }

Usage Example

 /**
  * read object
  * @return stdClass
  */
 public function readObject()
 {
     return parent::readObject();
 }