title: Cannot use object of type stdClass as array
body: <p>First of all, am not a Php geek.. so excuse my little knowledge around PHP stuff.
  I am using AMFPHP2 with Flex on frontend.
  I can pull data from backend as typed objects fine, but when I try to save, i am having this issue as below:</p>
  
  <pre><code>&lt;br /&gt;&lt;b&gt;Fatal error&lt;/b&gt;:  Cannot use object of type stdClass as array in &lt;b&gt;/mnt/array1/share/htdocs/htdocs/admin/application/amf/services/Item.php&lt;/b&gt; on line &lt;b&gt;88&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>Below is the code throwing this error:</p>
  
  <pre><code>Line86    public function saveCollection($collection) {
  Line87        for ($i=0; $i&lt;count($collection); $i++) {
  Line88            $this-&gt;saveItem($collection[$i]);
  Line89        }
  Line90    }
  </code></pre>
  
  <p>Below are my VO classes:
  ItemVO.php</p>
  
  <pre><code>class ItemVO {
  ..
  ..
  var $_explicitType = "ItemVO";
  ..
  ..
  }
  </code></pre>
  
  <p>ItemVO.as</p>
  
  <pre><code>package models.vo {
      [RemoteClass(alias="ItemVO")]  
      public class ItemVO {
  ...
  ...
      }
  }
  </code></pre>
  
  <p>Here is my folder structure:</p>
  
  <pre><code>-root/
  ------*.html
  ------*.swf
  ------application/
  -----------------amf/
  --------------------/index.php
  --------------------/models/vo/all vo files
  --------------------/services/all services
  -----------------libraries/
  --------------------------/Amfphp/
  </code></pre>
  
  <p>Here is my index.php</p>
  
  <pre><code>&lt;?php
  require_once dirname(dirname(__FILE__)) . '/libraries/Amfphp/ClassLoader.php';
  $config = new Amfphp_Core_Config();
  $config-&gt;serviceFolderPaths = array(dirname(__FILE__) . '/services/');
  $voFolders = array(dirname(__FILE__) . '/models/vo/');
  $customClassConverterConfig = array(‘customClassFolderPaths’ =&gt; $voFolders);
  $config-&gt;pluginsConfig['AmfphpCustomClassConverter'] = $customClassConverterConfig;
  $gateway = Amfphp_Core_HttpRequestGatewayFactory::createGateway($config);
  $gateway-&gt;service();
  $gateway-&gt;output();
  ?&gt;
  </code></pre>
  
  <p>Any help will be greatly appreciated.
  Thanks.</p>