Sure thing. If you want to return an array of com.one.of.my.customVO, 
then say the php class is:

<?php
class customVO
{
    //Declare variables below
    var $_explicitType = "com.one.of.my.customVO";
}
?>

PHP doesn't support packages, so to send the full package name to Flash 
you have to set the $_explicitType variable. The value of $_explicitType 
should be the same as that of [RemoteClass], ie:

package com.one.of.my
{
    [RemoteClass("com.one.of.my.customVO")]
    class customVO
    {
        //Stuff in here
    }
}

Then the rest is done for you. So for example:

function getArrayOfCustomVo()
{
    return array(new customVO(), new customVO());
}

That's pretty much all there is to it.

Patrick


Kevin a écrit :
> 1) Is is possible to return results from AMFPHP and have them easily 
> assign Value Objects on the Flex Client? (if so, how)
>
> EXAMPLE:
> call service to ask for an array of VO data.
> AMFPHP returns array of PHP Data(Value) Objects in result event.
> How do I then map the items in the VO array to a Flex VO? Is this 
> possible?
>
> I thought I could use something like this to do it, 
> [ ArrayElementType ( "com.one.of. my.customVO" )]
> but I am not sure where to put this?? or how to use it properly.
>
> 2) Is it bad form to give Cairngorm Value Objects custom getters & 
> setters to handle some basic data manipulation tasks?
>
> I have been doing this in my unit testing, but now that I am trying to 
> connect to AMFPHP to return the data, the getters & setters are 
> useless because the Flex VO is being ignored.
>
>
> Thanks for your help.
>
> - Kevin
>  

Reply via email to