public static function createGateway(Amfphp_Core_Config $config = null) { $contentType = null; if (isset($_GET['contentType'])) { $contentType = $_GET['contentType']; } else { if (isset($_SERVER['CONTENT_TYPE'])) { $contentType = $_SERVER['CONTENT_TYPE']; } } $rawInputData = self::getRawPostData(); return new Amfphp_Core_Gateway($_GET, $_POST, $rawInputData, $contentType, $config); }
<?php /** * This file is part of amfPHP * * LICENSE * * This source file is subject to the license that is bundled * with this package in the file license.txt. * @package Amfphp_Examples */ /** * a gateway php script like the normal gateway except that it uses example services * @author Ariel Sommeria-klein */ require_once dirname(__FILE__) . '/../Amfphp/ClassLoader.php'; $config = new Amfphp_Core_Config(); $config->serviceFolderPaths = array(dirname(__FILE__) . "/Services/"); $gateway = Amfphp_Core_HttpRequestGatewayFactory::createGateway($config); $gateway->service(); $gateway->output();