0 Replies Latest reply on May 12, 2010 6:24 AM by RobX82

    PHP Type Hinting and Flex Issue

    RobX82 Level 1

      From the PHP docs, "PHP 5 introduces Type Hinting. Functions are now able to force parameters to be objects (by specifying the name of the class in the function prototype) or arrays (since PHP 5.1)."  So i have a function that has a bunch of parameters setup with type hinting.  When i use the connect to dataservice wizard everything works great, it even gets the objects hinted in the parameters and adds them to my flex DataObjects.  Now if in flex if I create a new instance of this object, (var activeSync:DO_ActiveSyncServer= new DO_ActiveSyncServer();) and then pass it to my newly added data service i get the below error message.

       

      Catchable fatal error: Argument 2 passed to SetupWizard::CreateSetup() must be an instance of DO_ActiveSyncServer, instance of stdClass given in SetupWizard.php on line 29

       

      Anyone ever come across this issue before or know how to fix it?  It would seem that Flex passes this stdClass type no matter what to PHP for complex objects.

       

      Thanks