registerActionChain(); } /** * Sets the base path for loading service methods. * * Call this method to define the directory to look for service classes in. * Relative or full paths are acceptable * * @param string $path The path the the service class directory */ function setBaseClassPath($value) { $path = realpath($value . '/') . '/'; $GLOBALS['amfphp']['classPath'] = $path; } function service() { //Process the arguments $body = $this->createBody(); foreach($this->actions as $key => $action) { $result = $action($body); // invoke the first filter in the chain if($result === false) { //Go straight to serialization actions $serAction = 'serializationAction'; $serAction($body); break; } } echo $body->getResults(); } /** * Add a class mapping for adapters */ function addAdapterMapping($key, $value) { $GLOBALS['amfphp']['adapterMappings'][$key] = $value; } /** * This function should overriden by the gateways */ function createBody() { } /** * Create the chain of actions * Subclass gateway and overwrite to create a custom gateway */ function registerActionChain() { } } ?>