We are creating a webapplication with flex and php.
Everything is working very good, until we got to the library part of the application.
Every service so far had only 1 return type (eg: User, Group, ...)
Now for the library we want to return a ArrayCollection of different types of objects. To be more specific the LibraryService should return a ArrayCollection containing Folder and File objects.
But how to configure this in Flex (Flash Builder 4 (standard))?
So far it converts every object to the type Object, i would really like it to be Folder or File
The only solution we can think of right now is to create a new object Library that will contain 2 ArrayCollections, one of type Folder and one of type File. This could work ofcourse, but I wonder if there is a better solution for this OR that i can configure multiple return types for a service.
Any ideas/advice is greatly appreciated.
Normally if you are using Blazeds(Java stuff, i'm sure there should be something similar for php), you can map java objects to that of the AS objects, when you get the data back you are actually seeing the object which is a Folder or a File object rather than just a Object.
We don't use anything like BlazeDS.
Just plain (simple) php and flex.
This choice was made because we already have alot of services/servers/.. and we didn't want any more services to maintain.
Look at Zend or AMFPHP.