Example #1
0
 function amf_set_classmapping_callback($callback)
 {
     AMF::setClassmappingCallback($callback);
 }
Example #2
0
 public function testSerializeBytes()
 {
     $samples = [new ByteArray('A'), new ByteArray('$1�2'), new ByteArray(0b11000011101010), new ByteArray(file_get_contents(__DIR__ . '/php.ico'))];
     foreach ($samples as $sample) {
         $this->assertEquals($sample, AMF::deserialize(AMF::serialize($sample, AMF_DEFAULT_OPTIONS, Spec::AMF3_BYTE_ARRAY)));
     }
 }