silexlabs/amfphp-2.0 — Issue #5: amf3 dynamic object Serializer bug
Author: heyoulin
Created: 2011-11-14 14:25:24+00:00
State: open

Dynamic object should write a reference with null classname.

}else{
$traitsInfo = array("referenceId" => count($this->className2TraitsInfo), "propertyNames" => array());
$this->className2TraitsInfo[''] = $traitsInfo;
//anonymous object. So type this as a dynamic object with no sealed members.
//U29O-traits : 1011.
$this->writeAmf3Int(0xB);
//no class name. empty string for anonymous object
$this->writeAmf3String("");
//name/value pairs for dynamic properties
foreach ($d as $key => $value) {
if ($key[0] != "\0" && $key != $explicitTypeField) { //Don't show private members or explicit type
$this->writeAmf3String($key);
$this->writeAmf3Data($value);
}
}
//empty string, marks end of dynamic members
$this->outBuffer .= "\1";
}