Amfphp_Core_Amf_Deserializer::readArray PHP Method

readArray() protected method

readArray turns an all numeric keyed actionscript array into a php array.
protected readArray ( ) : array
return array The php array
    protected function readArray()
    {
        $ret = array();
        // init the array object
        $this->amf0storedObjects[] =& $ret;
        $length = $this->readLong();
        // get the length  of the array
        for ($i = 0; $i < $length; $i++) {
            // loop over all of the elements in the data
            $type = $this->readByte();
            // grab the type for each element
            $ret[] = $this->readData($type);
            // grab each element
        }
        return $ret;
        // return the data
    }

Usage Example

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