where everything comes together in amfphp.

The class used for the entry point of a remoting call

package Amfphp_Core
author Ariel Sommeria-klein

 Methods

constructor

__construct(array $getData, array $postData, String $rawInputData, String $contentType, \Amfphp_Core_Config $config) 

Parameters

$getData

array

typically the $_GET array.

$postData

array

typically the $_POST array.

$rawInputData

String

$contentType

String

$config

\Amfphp_Core_Config

optional. The default config object will be used if null

get the response headers.

getResponseHeaders() : array

Creates an associative array of headers, then filters them, then returns an array of strings

Returns

array

helper function for sending gateway data to output stream

output() 

The service method runs the gateway application.

service() : \<String>

It deserializes the raw data passed into the constructor as an Amfphp_Core_Amf_Packet, handles the headers, handles the messages as requests to services, and returns the responses from the services It does not however handle output headers, gzip compression, etc. that is the job of the calling script

Returns

\<String>the serialized amf packet containg the service responses

 Properties

 

$config : \Amfphp_Core_Config
 

$contentType : String

For example for amf, application/x-amf

 

$getData : array
 

$postData : array
 

$rawInputData : String
 

$rawOutputData : String

 Constants

 

filter called after the request is deserialized.

FILTER_DESERIALIZED_REQUEST 

The callee can modify the data and return it.

param
 

filter called to allow a plugin to override the default amf deserialized request handler.

FILTER_DESERIALIZED_REQUEST_HANDLER 

Plugin should return a Amfphp_Core_Common_IDeserializedRequestHandler if it recognizes the request

param

null at call in gateway.

param
 

filter called when the response is ready but not yet serialized.

FILTER_DESERIALIZED_RESPONSE 

The callee can modify the data and return it.

param
 

filter called to allow a plugin to override the default amf deserializer.

FILTER_DESERIALIZER 

Plugin should return a Amfphp_Core_Common_IDeserializer if it recognizes the content type

param

the deserializer. null at call in gateway.

param
 

filter called to allow a plugin to override the default amf exception handler.

FILTER_EXCEPTION_HANDLER 

If the plugin takes over the handling of the request message, it must set this to a proper Amfphp_Core_Common_IExceptionHandler

param

null at call in gateway.

param
 

filter called to get the headers

FILTER_HEADERS 
param

an associative array of headers. For example array('Content-Type' => 'application/x-amf')

param
 

filter called when the serialized request comes in.

FILTER_SERIALIZED_REQUEST 
todo this filter only allows manipulation of raw post data, and is as such a bit misleading. Maybe rename and do filters for GET and POST
param

the raw http data

 

filter called when the packet response is ready and serialized.

FILTER_SERIALIZED_RESPONSE 
param

the raw http data

 

filter called to allow a plugin to override the default amf serializer.

FILTER_SERIALIZER 
param

the serializer. null at call in gateway.

param

Plugin sets to a Amfphp_Core_Common_ISerializer if it recognizes the content type

 

filter just after plugin init.

FILTER_SERVICE_FOLDER_PATHS 

Use this to add a service folder for a plugin

param

serviceFolderPaths array of absolute paths

 

filter just after plugin init.

FILTER_SERVICE_NAMES_2_CLASS_FIND_INFO 

Use this to add a service for a plugin when a service folder isn't enough

param

serviceNames2ClassFindInfo array of ClassFindInfo. Key is the service nane