My ArrayCollection class
?php
class ArrayCollection extends ArrayObject
{
var $_explicitType = flex.messaging.io.ArrayCollection;
//http://weierophinney.net/matthew/archives/131-Overloading-arrays-in-PHP-5.2.0.html
public function __construct($config = array())
{
I am interested in your fix. I think it may actually be easier than
my approach of having to cast the Array each time it comes back to Flex.
How do you create the initial Array collection in PHP?
$myArray = new ArrayCollection();
$myArray-source = array();
Or is there a different way?
-
Yes it contains up to 600 items.
--- In flexcoders@yahoogroups.com, michael_ramirez44
[EMAIL PROTECTED] wrote:
Does your PHP array contain more then one item when your testing?
Michael Ramirez
--- In flexcoders@yahoogroups.com, thuijzer thuijzer@ wrote:
Whoops, I didn't write this
It must be something basic, but I can't find it.
I dubbelchecked every class Remote and in Flex. They are all the same.
Locations are all the same.
Now I checked what is comming from the remote server. Alle Classes are
typed correct. But where there should be ArrayCollections, there are
Array's,
Finaly I found a solution for my problem.
I created this class in PHP:
class ArrayCollection
{
var $_explicitType;
var $source;
function ArrayCollection()
{
$this-_explicitType = flex.messaging.io.ArrayCollection;
$this-source = array();
}
}
When I use
Kevin, thank you for your response.
Unfortunately it doesn't work. It also seems that this META is only
used for Array's. So I am not sure it will work in my case.
Thomas
--- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote:
you may need to use this meta tag to let Flex know what
I don't see an $_explicitType variable in your PHP code. You need to
add the following to you PHP classes.
var $_explicitType = com.app.classes.RemoteClass;
var $_explicitType = com.app.classes.RemoteClassObj;
Michael
--- In flexcoders@yahoogroups.com, Thomas Huijzer [EMAIL PROTECTED]
Whoops, I didn't write this down, but I got this in my code, so it
should not be the problem.
In fact, all PHP Objects return as Flex Objects, except for Array's.
They are not translated to ArrayCollections. So the ArrayCollections
in my Flex Objects remain empty.
--- In
I am guessing it must be something basic we are overlooking. I have
numerous nested VOs and ArrayCollection's of VO's that get returned
from PHP with no problem. As long as both the RemoteClass tag AND
the $_explicitType variable are exactly the same and both point to
the server location
Does your PHP array contain more then one item when your testing?
Michael Ramirez
--- In flexcoders@yahoogroups.com, thuijzer [EMAIL PROTECTED] wrote:
Whoops, I didn't write this down, but I got this in my code, so it
should not be the problem.
In fact, all PHP Objects return as Flex
10 matches
Mail list logo