The Service Router class is responsible for executing the remote service method and returning it's value.
based on the old 'Executive' of php 1.9. It looks for a service either explicitely defined in a ClassFindInfo object, or in a service folder.
package | Amfphp_Core_Common |
---|---|
author | Ariel Sommeria-klein |
__construct(array $serviceFolderPaths, array $serviceNames2ClassFindInfo, Boolean $checkArgumentCount)
array
folders containing service classes
array
a dictionary of service classes represented in a ClassFindInfo.
Boolean
executeServiceCall(string $serviceName, string $methodName, array $parameters) : mixed
if the service exists but not the function, an exception is thrown by call_user_func_array. It is pretty explicit, so no further code was added
string
string
array
mixed
the result of the function callgetServiceObject(String $serviceName) : Object
String
Object
service objectgetServiceObjectStatically(\type $serviceName, array $serviceFolderPaths, array $serviceNames2ClassFindInfo) : Object
Looks for a match in serviceNames2ClassFindInfo, then in the defined service folders. If none found, an exception is thrown
todo | maybe option for a fully qualified class name. this method is static so that it can be used also by the discovery service '__' are replaced by '/' to help the client generator support packages without messing with folders and the like |
---|
\type
array
array
Object
service object$checkArgumentCount : Boolean
This is useful for development, but should be disabled for production
$serviceFolderPaths : array
$serviceNames2ClassFindInfo : array
FILTER_SERVICE_OBJECT
Useful for authentication
param | |
---|---|
param | |
param | |
param |