Class Amfphp_Core_Gateway

Description

where everything comes together in amfphp.

The class used for the entry point of a remoting call

  • author: Ariel Sommeria-klein

Located in /Amfphp/Core/Gateway.php (line 20)


	
			
Class Constant Summary
 FILTER_DESERIALIZED_REQUEST = 'FILTER_DESERIALIZED_REQUEST'
 FILTER_DESERIALIZED_REQUEST_HANDLER = 'FILTER_DESERIALIZED_REQUEST_HANDLER'
 FILTER_DESERIALIZED_RESPONSE = 'FILTER_DESERIALIZED_RESPONSE'
 FILTER_DESERIALIZER = 'FILTER_DESERIALIZER'
 FILTER_EXCEPTION_HANDLER = 'FILTER_EXCEPTION_HANDLER'
 FILTER_HEADERS = 'FILTER_HEADERS'
 FILTER_SERIALIZED_REQUEST = 'FILTER_SERIALIZED_REQUEST'
 FILTER_SERIALIZED_RESPONSE = 'FILTER_SERIALIZED_RESPONSE'
 FILTER_SERIALIZER = 'FILTER_SERIALIZER'
 FILTER_SERVICE_FOLDER_PATHS = 'FILTER_SERVICE_FOLDER_PATHS'
 FILTER_SERVICE_NAMES_2_CLASS_FIND_INFO = 'FILTER_SERVICE_NAMES_2_CLASS_FIND_INFO'
Variable Summary
Method Summary
Amfphp_Core_Gateway __construct ( $getData,  $postData, String $rawInputData, String $contentType, [Amfphp_Core_Config $config = null])
void output ()
service ()
Variables
Amfphp_Core_Config $config (line 104)

config.

  • access: protected
String $contentType (line 122)

the content type. For example for amf, application/x-amf

  • access: protected
array $getData (line 110)

typically the $_GET array.

  • access: protected
array $postData (line 116)

typically the $_POST array.

  • access: protected
String $rawInputData (line 128)

the serialized request

  • access: protected
String $rawOutputData (line 134)

the serialized response

  • access: protected
Methods
Constructor __construct (line 147)

constructor

  • access: public
Amfphp_Core_Gateway __construct ( $getData,  $postData, String $rawInputData, String $contentType, [Amfphp_Core_Config $config = null])
  • array $getData: typically the $_GET array.
  • array $postData: typically the $_POST array.
  • String $rawInputData
  • String $contentType
  • Amfphp_Core_Config $config: optional. The default config object will be used if null
getResponseHeaders (line 230)

get the response headers. Creates an associative array of headers, then filters them, then returns an array of strings

  • access: public
array getResponseHeaders ()
output (line 245)

helper function for sending gateway data to output stream

  • access: public
void output ()
service (line 167)

The service method runs the gateway application. 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

  • return: the serialized amf packet containg the service responses
  • access: public
service ()
Class Constants
FILTER_DESERIALIZED_REQUEST = 'FILTER_DESERIALIZED_REQUEST' (line 53)

filter called after the request is deserialized. The callee can modify the data and return it.

FILTER_DESERIALIZED_REQUEST_HANDLER = 'FILTER_DESERIALIZED_REQUEST_HANDLER' (line 61)

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

Plugin should return a Amfphp_Core_Common_IDeserializedRequestHandler if it recognizes the request

FILTER_DESERIALIZED_RESPONSE = 'FILTER_DESERIALIZED_RESPONSE' (line 67)

filter called when the response is ready but not yet serialized. The callee can modify the data and return it.

FILTER_DESERIALIZER = 'FILTER_DESERIALIZER' (line 47)

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

Plugin should return a Amfphp_Core_Common_IDeserializer if it recognizes the content type

FILTER_EXCEPTION_HANDLER = 'FILTER_EXCEPTION_HANDLER' (line 76)

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

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

FILTER_HEADERS = 'FILTER_HEADERS' (line 97)

filter called to get the headers

FILTER_SERIALIZED_REQUEST = 'FILTER_SERIALIZED_REQUEST' (line 39)

filter called when the serialized request comes in.

  • 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
FILTER_SERIALIZED_RESPONSE = 'FILTER_SERIALIZED_RESPONSE' (line 90)

filter called when the packet response is ready and serialized.

FILTER_SERIALIZER = 'FILTER_SERIALIZER' (line 84)

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

FILTER_SERVICE_FOLDER_PATHS = 'FILTER_SERVICE_FOLDER_PATHS' (line 26)

filter just after plugin init. Use this to add a service folder for a plugin

FILTER_SERVICE_NAMES_2_CLASS_FIND_INFO = 'FILTER_SERVICE_NAMES_2_CLASS_FIND_INFO' (line 32)

filter just after plugin init. Use this to add a service for a plugin when a service folder isn't enough

Documentation generated on Mon, 23 Jan 2012 17:22:05 -0300 by phpDocumentor 1.4.3