hmm. Vo's composed of other VO's should work.  

Make sure on the PHP side that the var is public.

I use the explcitType option.... so this should be set in all your VO's on the 
PHP side...

public static $_explicitType = "UserVO"; 

Also, If you are returning a VO from PHP that has not been instantiated at 
least once on 
the flex side. Flex will leave it as an Object when it receives it from PHP. 

steve


--- In [email protected], "Dan" <[EMAIL PROTECTED]> wrote:
>
> Well removing the full class path from my aliases in flash/php seemed to fix 
> it for me. 
> Much simpler also. 
> 
>  I am having problems though getting a nested VO sent to php back into flex.  
> For 
> example, I have a UserVO as the primaryContact in my AccountVO and its 
> throwing  type 
> coercion error in flex coming back.  When loading the nested VO initially it 
> works fine.
> 
>   Any ideas?
> 
> 
> --- In [email protected], "sgrace99" <sysco@> wrote:
> >
> > I use AMFPHP no issues here... my Objects transfer just fine....
> > 
> > 1.Have you registered the class alias in your UserVO.as?
> > 
> > import flash.net.registerClassAlias;        
> > [RemoteClass(alias="UserVO")]
> > 
> > 
> > 2.My service calls in my delegates look like this.....
> > 
> > public function getUser(vo:UserVO):void
> > {
> >     var token:AsyncToken = this.service.getUser(vo);
> >     token.addResponder(this.responder);
> > }
> > 
> > 3. Did you set the classMappingsPath in gateway.php?
> > 
> > $gateway->setClassMappingsPath("my/path/to/voDir/");
> > 
> > 
> > ....
> > steve
> > 
> > 
> > 
> > --- In [email protected], "JWOpitz" <jwopitz@> wrote:
> > >
> > > an update to this:
> > > 
> > > I ended up dropping the casting to the UserVO.php.  So the function
> > > signature looks like:
> > > 
> > >      function getUser ($user){}
> > > 
> > > rather than 
> > > 
> > >      function getUser (UserVO $user){}
> > > 
> > > then inside the new function I set the type to an object using:
> > > 
> > >      settype(&user, "object");
> > > 
> > > this allows the php function to be able to retrieve the object
> > > propeties such as $user->name or $user->password since it sees it as
> > > an object rather than the array flex likes to send.
> > > 
> > > Though this works, it doesn't sit well with me because I thought the
> > > whole idea of remoting was to be able to pass classes around without
> > > having to do these kind of work arounds.
> > > 
> > > If anyone has any ideas on this, please give me a shout.
> > > 
> > > Thanks,
> > > J
> > >
> >
>

Reply via email to