Amfphp_Core_Amf_Deserializer::readAmf3Array PHP Method

readAmf3Array() protected method

read amf 3 array
protected readAmf3Array ( ) : array
return array
    protected function readAmf3Array()
    {
        $handle = $this->readAmf3Int();
        $inline = ($handle & 1) != 0;
        $handle = $handle >> 1;
        if ($inline) {
            $hashtable = array();
            $this->storedObjects[] =& $hashtable;
            $key = $this->readAmf3String();
            while ($key != '') {
                $value = $this->readAmf3Data();
                $hashtable[$key] = $value;
                $key = $this->readAmf3String();
            }
            for ($i = 0; $i < $handle; $i++) {
                //Grab the type for each element.
                $value = $this->readAmf3Data();
                $hashtable[$i] = $value;
            }
            return $hashtable;
        } else {
            return $this->storedObjects[$handle];
        }
    }

Usage Example

コード例 #1
0
 /**
  * read amf 3 array
  * @return array
  */
 public function readAmf3Array()
 {
     return parent::readAmf3Array();
 }