PHP Class APIXmlrpc, glpi

Inheritance: extends API
Show file Open project: glpi-project/glpi Class Usage Examples

Protected Properties

Property Type Description
$debug
$format
$parameters
$request_uri
$url_elements
$verb

Public Methods

Method Description
call ( ) : xmlrpc parse POST var to retrieve - Resource - Identifier - and parameters
getTypeName ( $nb )
parseIncomingParams ( ) Construct this->parameters from POST data

Protected Methods

Method Description
escapekeys ( array $response = [] ) : array Add a space before all numeric keys to prevent their deletion by xmlrpc_encode_request function see https://bugs.php.net/bug.php?id=21949
returnResponse ( mixed $response, integer $httpcode = 200, array $aditionnalheaders = [] ) Generic function to send a message and an http code to client

Method Details

call() public method

And send to method corresponding identified resource
public call ( ) : xmlrpc
return xmlrpc response

escapekeys() protected method

Add a space before all numeric keys to prevent their deletion by xmlrpc_encode_request function see https://bugs.php.net/bug.php?id=21949
protected escapekeys ( array $response = [] ) : array
$response array the response array to escape
return array the escaped response.

getTypeName() public static method

See also: CommonGLPI::GetTypeName()
public static getTypeName ( $nb )

parseIncomingParams() public method

Construct this->parameters from POST data
public parseIncomingParams ( )

returnResponse() protected method

Generic function to send a message and an http code to client
protected returnResponse ( mixed $response, integer $httpcode = 200, array $aditionnalheaders = [] )
$response mixed string message or array of data to send
$httpcode integer http code (see : https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
$aditionnalheaders array headers to send with http response (must be an array(key => value))

Property Details

$debug protected property

protected $debug

$format protected property

protected $format

$parameters protected property

protected $parameters

$request_uri protected property

protected $request_uri

$url_elements protected property

protected $url_elements

$verb protected property

protected $verb