Gateway.php 963 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. define("AMFPHP_BASE", realpath(dirname(dirname(dirname(__FILE__)))) . "/");
  3. require_once(AMFPHP_BASE . "shared/app/BasicGateway.php");
  4. require_once(AMFPHP_BASE . "shared/util/MessageBody.php");
  5. require_once(AMFPHP_BASE . "xmlrpc/app/Actions.php");
  6. class Gateway extends BasicGateway
  7. {
  8. function createBody()
  9. {
  10. if(strlen($GLOBALS["HTTP_RAW_POST_DATA"]) == 0)
  11. {
  12. echo("The XML-RPC gateway is installed correctly");
  13. exit();
  14. }
  15. $GLOBALS['amfphp']['encoding'] = 'xmlrpc';
  16. $body = & new MessageBody();
  17. $body->setValue($GLOBALS["HTTP_RAW_POST_DATA"]);
  18. return $body;
  19. }
  20. /**
  21. * Create the chain of actions
  22. */
  23. function registerActionChain()
  24. {
  25. $this->actions['deserialization'] = 'deserializationAction';
  26. $this->actions['classLoader'] = 'classLoaderAction';
  27. $this->actions['security'] = 'securityAction';
  28. $this->actions['exec'] = 'executionAction';
  29. $this->actions['debug'] = 'debugAction';
  30. }
  31. }
  32. ?>