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
}