Ok i have finally figured out my answer
The way we use Rest Services to access XML output like
<data>
<path>mypath</path>
</data>
That is accessed by using event.result.data.path; if using event:ResultEvent
Now with Zend AMF using examples based off Creating a Simple Crud Application and Shrinking and modifying the code to my liking yet the return of the php object remains the same...
I have to use this
var obj:Object = event.result;
trace("---This is a Test!---");
trace("Path is: "+String(obj[0].path));
trace("-----End of Test-----");
}
and it outputs as follows in my flash debugger console
---This is a Test!---
Path is: mypath
-----End of Test-----
Now obj[0]
is basically the first Object Row
"path" is the String in the Object set by using this sample code on the ZEND AMF PHP Class file
$Data = array();
$data = new login();
$data->path = mypath;
$data->passed = 10;
array_push($Data,$data);
return $Data;
If i wanted to access the passed
value i'd have to use
trace("Path is: "+String(obj[0].passed));
which would output as 10
If i wanted to Access the 2nd set of Object Values and so on...
increment the obj[0]
to obj[1]
and increase for any additional Rows
In my case any obj[1]
would output as null
Since I have no additional rows at this time.
Of Course mostly we hardly ever need to access multiple rows of Objects since thats commonly added as ArrayCollections or Arrays and Displayed in Datagrids and Lists and whatnot. Like the Simple Crud Demonstration at the link below shows.
Also i use Open Flex 3.6 SDK therefore in the Simple Crud Application i had to modify all the s:
(Spark Containers) To mx: and eliminate fx:
Declarations as well thats just a note for those attempting to use the Simple Crud PHP Zend Application and not using Flex 4 nor Flex 4.5
The Simple Crud i was referring to is linked as follows
http://www.adobe.com/devnet/flex/articles/crud_flex_php_zend.html