|
static | get_supported_versions () |
| Get the list of supported versions based on the available classes.
|
|
static | instance (string $serverurl, string $accesstoken,) |
| Return the versioned instance of the API.
|
|
◆ execute()
communication_matrix\matrix_client::execute |
( |
command | $command | ) |
|
|
protectedinherited |
Execute the specified command.
- Parameters
-
- Return values
-
◆ get_client()
communication_matrix\matrix_client::get_client |
( |
| ) |
|
|
protectedinherited |
Helper to fetch the HTTP Client for the instance.
- Return values
-
◆ get_http_client()
static communication_matrix\matrix_client::get_http_client |
( |
| ) |
|
|
staticprotectedinherited |
Helper to fetch the HTTP Client.
- Return values
-
◆ get_server_url()
communication_matrix\matrix_client::get_server_url |
( |
| ) |
|
|
inherited |
Get the URL of the server.
- Return values
-
◆ get_supported_features()
communication_matrix\matrix_client::get_supported_features |
( |
| ) |
|
|
inherited |
Get a list of the features supported by this client.
- Return values
-
◆ get_supported_versions()
static communication_matrix\matrix_client::get_supported_versions |
( |
| ) |
|
|
staticinherited |
Get the list of supported versions based on the available classes.
- Return values
-
◆ get_token()
communication_matrix\matrix_client::get_token |
( |
| ) |
|
|
inherited |
Get the current token in use.
- Return values
-
◆ get_version()
communication_matrix\matrix_client::get_version |
( |
| ) |
|
|
inherited |
Get the API version of the current instance.
- Return values
-
◆ get_version_from_classname()
static communication_matrix\matrix_client::get_version_from_classname |
( |
string | $classname | ) |
|
|
staticprotectedinherited |
Normalise an API version from a classname.
- Parameters
-
string | $classname | The short classname, omitting any namespace or file extension |
- Return values
-
string | The normalised version |
◆ implements_feature()
communication_matrix\matrix_client::implements_feature |
( |
array|string | $feature | ) |
|
|
inherited |
Determine if the API supports a feature.
If an Array is provided, this will return true if any of the specified features is implemented.
- Parameters
-
string[] | string | $feature | The feature to check. This is in the form of a namespaced class. |
- Return values
-
◆ instance()
static communication_matrix\matrix_client::instance |
( |
string | $serverurl, |
|
|
string | $accesstoken ) |
|
staticinherited |
Return the versioned instance of the API.
- Parameters
-
string | $serverurl | The URL of the API server |
string | $accesstoken | The admin access token to use |
- Return values
-
◆ meets_version()
communication_matrix\matrix_client::meets_version |
( |
string | $minversion | ) |
|
|
inherited |
Check if the API version is at least the specified version.
- Parameters
-
string | $minversion | The minimum API version required |
- Return values
-
◆ query_server_supports()
static communication_matrix\matrix_client::query_server_supports |
( |
string | $serverurl | ) |
|
|
staticprotectedinherited |
Query the supported versions, and any unstable features, from the server.
Servers must implement the client versions API described here:
- Parameters
-
string | $serverurl | The server base |
- Return values
-
null|stdClass | The list of supported versions and a list of enabled unstable features |
◆ require_feature()
communication_matrix\matrix_client::require_feature |
( |
array|string | $feature | ) |
|
|
inherited |
Require that the API supports a feature.
If an Array is provided, this is treated as a require any of the features.
- Parameters
-
string[] | string | $feature | The feature to test |
- Exceptions
-
◆ require_features()
communication_matrix\matrix_client::require_features |
( |
array | $features | ) |
|
|
inherited |
Require that the API supports a list of features.
All features specified will be required.
If an array is provided as one of the features, any of the items in the nested array will be required.
- Parameters
-
string[] | array[] | $features | The list of features required |
Here is an example usage: $matrixapi->require_features([
communication_matrix::local::spec::features::create_room::class,
[
communication_matrix::local::spec::features::get_room_info_v1::class,
communication_matrix::local::spec::features::get_room_info_v2::class,
]
])
◆ requires_version()
communication_matrix\matrix_client::requires_version |
( |
string | $minversion | ) |
|
|
inherited |
Assert that the API version is at least the specified version.
- Parameters
-
string | $minversion | The minimum API version required |
- Exceptions
-
◆ $client
$serverurl The URL of the home server
$accesstoken The access token of the matrix server The client to use
The documentation for this class was generated from the following file:
- communication/provider/matrix/classes/local/spec/v1p5.php