Horde_Rpc_Soap
extends Horde_Rpc
in package
The Horde_Rpc_Soap class provides a PHP 5 Soap implementation of the Horde RPC system.
Copyright 2003-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- $_allowedMethods : array<string|int, mixed>
- List of method names to allow.
- $_allowedTypes : array<string|int, mixed>
- List of types to emit in the WSDL.
- $_server : object
- Resource handler for the SOAP server.
- $_serviceName : string
- Name of the SOAP service to use in the WSDL.
- $_logger : Horde_Log_Logger
- Logging
- $_params : array<string|int, mixed>
- All driver-specific parameters.
- $_request : Horde_Controller_Request_Http
- Request variables, cookies etc.
- $_requestMissingAuthorization : bool
- Whether we should exit if auth fails instead of requesting authorization credentials.
- $_requireAuthorization : bool
- Do we need an authenticated user?
- __construct() : mixed
- SOAP server constructor
- authorize() : bool
- Check authentication. Different backends may handle authentication in different ways. The base class implementation checks for HTTP Authentication against the Horde auth setup.
- factory() : Horde_Rpc
- Attempts to return a concrete RPC server instance based on $driver.
- getInput() : mixed
- Get the request body input. Different RPC backends can override this to return an open stream to php://stdin, for instance - whatever is easiest to handle in the getResponse() method.
- getResponse() : string
- Takes a SOAP request and returns the result.
- getResponseContentType() : string
- Returns the Content-Type of the response.
- request() : mixed
- Builds a SOAP request and sends it to the SOAP server.
- sendOutput() : void
- Send the output back to the client
Properties
$_allowedMethods
List of method names to allow.
public
array<string|int, mixed>
$_allowedMethods
= array()
$_allowedTypes
List of types to emit in the WSDL.
public
array<string|int, mixed>
$_allowedTypes
= array()
$_server
Resource handler for the SOAP server.
public
object
$_server
$_serviceName
Name of the SOAP service to use in the WSDL.
public
string
$_serviceName
= \null
$_logger
Logging
protected
Horde_Log_Logger
$_logger
$_params
All driver-specific parameters.
protected
array<string|int, mixed>
$_params
= array()
$_request
Request variables, cookies etc.
protected
Horde_Controller_Request_Http
$_request
..
$_requestMissingAuthorization
Whether we should exit if auth fails instead of requesting authorization credentials.
protected
bool
$_requestMissingAuthorization
= \true
$_requireAuthorization
Do we need an authenticated user?
protected
bool
$_requireAuthorization
= \true
Methods
__construct()
SOAP server constructor
public
__construct(mixed $request[, mixed $params = array() ]) : mixed
Parameters
- $request : mixed
-
The request object.
- $params : mixed = array()
-
A hash containing any additional configuration or connection parameters a subclass might need.
Tags
Return values
mixed —authorize()
Check authentication. Different backends may handle authentication in different ways. The base class implementation checks for HTTP Authentication against the Horde auth setup.
public
authorize() : bool
Return values
bool —Returns true if authentication is successful. Should send appropriate "not authorized" headers or other response codes/body if auth fails, and take care of exiting.
factory()
Attempts to return a concrete RPC server instance based on $driver.
public
static factory(mixed $driver, mixed $request[, array<string|int, mixed> $params = null ]) : Horde_Rpc
Parameters
- $driver : mixed
-
The type of concrete Horde_Rpc subclass to return.
- $request : mixed
- $params : array<string|int, mixed> = null
-
A hash containing any additional configuration or connection parameters a subclass might need.
Return values
Horde_Rpc —The newly created concrete Horde_Rpc server instance, or an exception if there is an error.
getInput()
Get the request body input. Different RPC backends can override this to return an open stream to php://stdin, for instance - whatever is easiest to handle in the getResponse() method.
public
getInput() : mixed
The base class implementation looks for $HTTP_RAW_POST_DATA and returns that if it's available; otherwise, it returns the contents of php://stdin.
Return values
mixed —The input - a string (default), a filehandle, etc.
getResponse()
Takes a SOAP request and returns the result.
public
getResponse(mixed $request) : string
Parameters
- $request : mixed
Return values
string —The XML encoded response from the server.
getResponseContentType()
Returns the Content-Type of the response.
public
getResponseContentType() : string
Return values
string —The MIME Content-Type of the RPC response.
request()
Builds a SOAP request and sends it to the SOAP server.
public
static request(string|Horde_Url $url, string $method, array<string|int, mixed> $params, SoapClient $soap[, mixed $unused = null ]) : mixed
This statically called method is actually the SOAP client.
Parameters
- $url : string|Horde_Url
-
Ignored.
- $method : string
-
The method to call.
- $params : array<string|int, mixed>
-
A hash containing any necessary parameters for the method call.
- $soap : SoapClient
-
A configured SoapClient object.
- $unused : mixed = null
-
This param is only here to be compatible with Horde_Rpc, since that has $driver as the first param.
Tags
Return values
mixed —The returned result from the method
sendOutput()
Send the output back to the client
public
sendOutput(string $output) : void
Parameters
- $output : string
-
The output to send back to the client. Can be overridden in classes if needed.