1

I am working on zend Amf php, where the data is send as an array collection from flex (as3) to a PHP service, My question is how to receive the array collection in php side?

I created a class, and included this class on the php service file

class Application_Vo_ArrayCollection {

public $source = array();

public function __construct($arr = null) {
    if(isset($arr))
        $this->source = $arr;
    else {
        $this->source = array();
    }
}

public function push($o) {
    array_push($this->source, $o);
}

public function addItem($index, $item) {
    $this->source[$index] = $item;
}
}

Now, when the php service is invoked from flex.

  public function my_php_service( $userdata, Application_Vo_ArrayCollection $questiondata, $requestdata ) {

}  

an error is thrown, Unable to parse null body data Unsupported type marker: 17

I want to make sure is this the correct way of receiving the array collection in php? Application_Vo_ArrayCollection $questiondata in my function definition.

Thanks,

0 Answers0