Horde_Rpc_ActiveSync
extends Horde_Rpc
in package
Copyright 2009-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
- $_contentType : string
- Content type header to send in response.
- $_get : array<string|int, mixed>
- Holds the request's GET variables
- $_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?
- $_server : Horde_ActiveSync
- The ActiveSync server object
- __construct() : mixed
- Constructor.
- authorize() : bool
- Override the authorize method and always return true. The ActiveSync server classes handle authentication directly since we need complete control over what responses are sent.
- factory() : Horde_Rpc
- Attempts to return a concrete RPC server instance based on $driver.
- getInput() : mixed
- Horde_ActiveSync will read the input stream directly, do not access it here.
- getResponse() : string
- Sends an RPC request to the server and returns the result.
- getResponseContentType() : string
- Returns the Content-Type of the response.
- request() : mixed
- Builds an RPC request and sends it to the RPC server.
- sendOutput() : void
- Send the output back to the client
- _handleError() : mixed
- Output exception information to the logger.
- _sendAuthenticationFailedHeaders() : mixed
- Send 401 Unauthorized headers.
Properties
$_contentType
Content type header to send in response.
protected
string
$_contentType
= 'application/vnd.ms-sync.wbxml'
$_get
Holds the request's GET variables
protected
array<string|int, mixed>
$_get
= array()
$_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
$_server
The ActiveSync server object
protected
Horde_ActiveSync
$_server
Methods
__construct()
Constructor.
public
__construct(Horde_Controller_Request_Http $request[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $request : Horde_Controller_Request_Http
-
The request object.
- $params : array<string|int, mixed> = array()
-
A hash containing configuration parameters:
- server: (Horde_ActiveSync) The ActiveSync server object. DEFAULT: none, REQUIRED
Return values
mixed —authorize()
Override the authorize method and always return true. The ActiveSync server classes handle authentication directly since we need complete control over what responses are sent.
public
authorize() : bool
Return values
bool —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()
Horde_ActiveSync will read the input stream directly, do not access it here.
public
getInput() : mixed
Tags
Return values
mixed —The input - a string (default), a filehandle, etc.
getResponse()
Sends an RPC request to the server and returns the result.
public
getResponse(string $request) : string
Parameters
- $request : string
-
PHP input stream (ignored).
Return values
string —The 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 an RPC request and sends it to the RPC server.
public
static request(string $driver, string|Horde_Url $url, string $method, mixed $client[, array<string|int, mixed> $params = null ]) : mixed
This statically called method is actually the RPC client.
Parameters
- $driver : string
-
The protocol driver to use. Currently 'soap', 'xmlrpc' and 'jsonrpc' are available.
- $url : string|Horde_Url
-
The path to the RPC server on the called host.
- $method : string
-
The method to call.
- $client : mixed
-
An appropriate request client for the type of request. (Horde_Http_Request, SoapClient etc..)
- $params : array<string|int, mixed> = null
-
A hash containing any necessary parameters for the method call.
Tags
Return values
mixed —The returned result from the method
sendOutput()
Send the output back to the client
public
sendOutput(mixed $output) : void
Parameters
- $output : mixed
-
The output to send back to the client. Can be overridden in classes if needed.
Tags
Return values
void —_handleError()
Output exception information to the logger.
protected
_handleError(Exception $e) : mixed
Parameters
- $e : Exception
-
The exception
Tags
Return values
mixed —_sendAuthenticationFailedHeaders()
Send 401 Unauthorized headers.
protected
_sendAuthenticationFailedHeaders(mixed $e) : mixed
Parameters
- $e : mixed