title: Mapping PHP and Flex Objects
body: <p>I am using ZendAMF for remoting. </p>
  
  <pre><code>&lt;?php
      error_reporting(E_ALL | E_STRICT); //error reporting, not needed
  
      require_once "Zend/Amf/Server.php"; //the zendAMF server
      require_once "process.php";  //our test class
  
      $server = new Zend_Amf_Server(); //declare the server
  
      $server-&gt;setClass("process"); //load our test-class to the server
      $server-&gt;setClassMap("Session", "Session");
      echo($server-&gt;handle()); // needed to start the server
  ?&gt;
  </code></pre>
  
  <p>My Question is i have a ActionScript class Session and a PHP Class Session, but still it does not get mapped. I have some doubts... may be silly... </p>
  
  <p>Should the file name of PHP class to be the same name of class name, as its not necessary but while mapping does it carry a value score.</p>
  
  <p>How will you call those mapped objects inside your flex application. My approach is indicated below, but not sure whether its correct or not.</p>
  
  <p>$server->setClassMap("Session", "Session");
  Which is a PHP and Flex class in the above function.</p>
  
  <p>Also my PHP session class is inside the include directory, should i indicate that anywhere or the ZendAMf will take care of it.</p>
  
  <p>Flex Code.</p>
  
  <pre><code>var userSession:Session = new Session();
  sessionHold.text = userSession.userid; 
  </code></pre>
  
  <p>Thanks.</p>