allows inclusion of an amfPHP entry point script.
This is so that a script running on the same server can include the entry point script and execute a request.
It works by setting the required globals describing the request, including the entry point script, and retrieving the response data.
globals are: $amfphpIncludedRequestServiceName $amfphpIncludedRequestMethodName $amfphpIncludedRequestParameters $amfphpIncludedRequestReturnValue
declare and them before including your entry point script. For example:
$amfphpIncludedRequestServiceName = "AmfphpDiscoveryService"; $amfphpIncludedRequestMethodName = "discover"; $amfphpIncludedRequestParameters = array(); $amfphpIncludedRequestReturnValue = null; require(dirname(FILE) . '/../../Amfphp/index.php'); print_r($amfphpIncludedRequestReturnValue);
the plugin considers that if $amfphpIncludedRequestServiceName is set, then the request is an included request and that it must be handled here.
package | Amfphp_Plugins_AmfphpIncludedRequest |
---|---|
author | Ariel Sommeria-Klein |
__construct(array $config)
array
optional key/value pairs in an associative array. Used to override default configuration values.
deserialize(array $getData, array $postData, string $rawPostData) : string
see | \Amfphp_Core_Common_IDeserializer |
---|
array
array
string
string
filterHandler(mixed $handler, String $contentType) : \this
mixed
null at call in gateway.
String
\this
or nullfilterHeaders(array $headers, string $contentType) : array
array
string
array
handleDeserializedRequest(array $deserializedRequest, \Amfphp_Core_Common_ServiceRouter $serviceRouter) : \the
This should not handle exceptions, as this is done separately
see | \Amfphp_Core_Common_IDeserializedRequestHandler |
---|
array
\Amfphp_Core_Common_ServiceRouter
\the
service call responseserialize(mixed $data) : string
The return type is noted as a String, but is a binary stream. echo it to the output buffer
see | \Amfphp_Core_Common_ISerializer |
---|
mixed
string
the encoded JSON string sent to JavaScript