PHP Класс Horde_OpenXchange_Base, horde

Автор: Jan Schneider ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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() защищенный Метод

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

_request() защищенный Метод

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.
Результат array The decoded result data or null if no data has been returned but the request was still successful.

getConfig() публичный Метод

Returns user configuration.
public getConfig ( string $config ) : mixed
$config string A configuration namespace.
Результат mixed Configuration contents.

getGroup() публичный Метод

Returns information about a system group.
public getGroup ( integer $id ) : array
$id integer A group ID.
Результат array Group information hash.

getUser() публичный Метод

Returns information about a system user.
public getUser ( integer $id ) : array
$id integer A user ID.
Результат array User information hash.

listResources() публичный Метод

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.
Результат array List of resources with resource IDs as keys and information hashes as values.

login() публичный Метод

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

logout() публичный Метод

Logs the current user out.
public logout ( )

Описание свойств

$_client защищенное свойство

HTTP client
protected Horde_Http_Client $_client
Результат Horde_Http_Client

$_cookies защищенное свойство

All cookies to sent with OX requests.
protected array $_cookies
Результат array

$_folderType защищенное свойство

The folder category.
protected string $_folderType
Результат string

$_params защищенное свойство

Any parameters.
protected array $_params
Результат array

$_session защищенное свойство

The current session ID.
protected string $_session
Результат string

$_uri защищенное свойство

Base URI of the API endpoint.
protected string $_uri
Результат string