where everything comes together in amfphp.
The class used for the entry point of a remoting call
package | Amfphp_Core |
---|---|
author | Ariel Sommeria-klein |
__construct(array $getData, array $postData, String $rawInputData, String $contentType, \Amfphp_Core_Config $config)
array
typically the $_GET array.
array
typically the $_POST array.
String
String
getResponseHeaders() : array
Creates an associative array of headers, then filters them, then returns an array of strings
array
output()
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
\<String>
the serialized amf packet containg the service responses$config : \Amfphp_Core_Config
$contentType : String
For example for amf, application/x-amf
$getData : array
$postData : array
$rawInputData : String
$rawOutputData : String
FILTER_DESERIALIZED_REQUEST
The callee can modify the data and return it.
param |
---|
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_DESERIALIZED_RESPONSE
The callee can modify the data and return it.
param |
---|
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_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_HEADERS
param | an associative array of headers. For example array('Content-Type' => 'application/x-amf') |
---|---|
param |
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_SERIALIZED_RESPONSE
param | the raw http data |
---|
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_SERVICE_FOLDER_PATHS
Use this to add a service folder for a plugin
param | serviceFolderPaths array of absolute paths |
---|
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 |
---|