PHP Class Horde_OpenXchange_Base, horde

Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_client Horde_Http_Client HTTP client
$_cookies array All cookies to sent with OX requests.
$_folderType string The folder category.
$_params array Any parameters.
$_session string The current session ID.
$_uri string Base URI of the API endpoint.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
getConfig ( string $config ) : mixed Returns user configuration.
getGroup ( integer $id ) : array Returns information about a system group.
getUser ( integer $id ) : array Returns information about a system user.
listResources ( string $type = self::RESOURCE_PRIVATE ) : array Returns a list of visible groupware resources.
login ( string $user, string $password ) Logs a user in.
logout ( ) Logs the current user out.

Méthodes protégées

Méthode Description
_login ( ) Logs a user in, if necessary.
_request ( string $method, string $namespace, array $params, array | string $data = [] ) : array Sends a request and parses the response.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $params = [] )
$params array List of optional parameters: - client: (Horde_Http_Client) An HTTP client. - endpoint: (string) The URI of the OX API endpoint. - user: (string) Authentication user. - password: (string) Authentication password.

_login() protected méthode

Logs a user in, if necessary.
protected _login ( )

_request() protected méthode

Sends a request and parses the response.
protected _request ( string $method, string $namespace, array $params, array | string $data = [] ) : array
$method string A HTTP request method (uppercase).
$namespace string An API namespace.
$params array URL parameters.
$data array | string Request data.
Résultat array The decoded result data or null if no data has been returned but the request was still successful.

getConfig() public méthode

Returns user configuration.
public getConfig ( string $config ) : mixed
$config string A configuration namespace.
Résultat mixed Configuration contents.

getGroup() public méthode

Returns information about a system group.
public getGroup ( integer $id ) : array
$id integer A group ID.
Résultat array Group information hash.

getUser() public méthode

Returns information about a system user.
public getUser ( integer $id ) : array
$id integer A user ID.
Résultat array User information hash.

listResources() public méthode

Returns a list of visible groupware resources.
public listResources ( string $type = self::RESOURCE_PRIVATE ) : array
$type string An resource type, one of the RESOURCE_* constants.
Résultat array List of resources with resource IDs as keys and information hashes as values.

login() public méthode

Logs a user in.
public login ( string $user, string $password )
$user string A user name.
$password string A password.

logout() public méthode

Logs the current user out.
public logout ( )

Property Details

$_client protected_oe property

HTTP client
protected Horde_Http_Client $_client
Résultat Horde_Http_Client

$_cookies protected_oe property

All cookies to sent with OX requests.
protected array $_cookies
Résultat array

$_folderType protected_oe property

The folder category.
protected string $_folderType
Résultat string

$_params protected_oe property

Any parameters.
protected array $_params
Résultat array

$_session protected_oe property

The current session ID.
protected string $_session
Résultat string

$_uri protected_oe property

Base URI of the API endpoint.
protected string $_uri
Résultat string