AMF typed objects from flex back to PHP?

Finally resolved the issue. Here is the solution for those who might come across the same issue in the future.

Finally resolved the issue. Here is the solution for those who might come across the same issue in the future. For your PHP class: Php namespace app\testing; class CTest{ var $_explicitType = 'app\testing\CTest'; var $stuff1; var $stuff2; } For your actionscript class: package com.

Mysite { Bindable RemoteClass(alias="app\\\\testing\\\\CTest") public class CTest { public var stuff1:String; public var stuff2:String; public function CTest() { } } } I think the problem is due to the serialization and deserialization of the AMF body. Effectively, the remote class is has 2 slashes escaped, resulting in this: app\\testing\\CTest. Once it is deserialzed by Zend_AMF, since there are 2 slashes, it means that the backslashes are escaped into this: app\testing\CTest.

This is just a hunch of course, but some testing with Charles proved that this is the case. Another possible solution is to modify Zend_Amf_Parse_TypeLoader.php. On line 99, we could replace: if(!$class) { $class = str_replace('.

', '_', $className); } with if(!$class) { $class = str_replace('. ', '\\, $className); } Effectively, we can then just use dot syntax for the class mappings, which actionscript will place nicely with: RemoteClass(alias="app.testing. CTest") var $_explicitType = 'app.testing.

CTest'; Obviously this will is a pretty nice solution, but I prefer not to modify with vendor code, as the Zend_AMF library will be updated with newer versions in the future. For now, my solution is to just use 4 slashes.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions