(no description)
File Size: | 340 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
matrix_client:: (17 methods):
__construct()
instance()
implements_feature()
get_supported_features()
require_feature()
require_features()
get_server_url()
query_server_supports()
get_supported_versions()
get_token()
get_client()
get_http_client()
execute()
get_version()
get_version_from_classname()
meets_version()
requires_version()
Class: matrix_client - X-Ref
The abstract class for a versioned API client for Matrix.__construct(protected string $serverurl,protected string $accesstoken,) X-Ref |
Matrix events constructor to get the room id and refresh token usage if required. param: string $serverurl The URL of the API server param: string $accesstoken The admin access token |
instance(string $serverurl,string $accesstoken,) X-Ref |
Return the versioned instance of the API. param: string $serverurl The URL of the API server param: string $accesstoken The admin access token to use return: matrix_client |
implements_feature(array|string $feature) X-Ref |
Determine if the API supports a feature. If an Array is provided, this will return true if any of the specified features is implemented. param: string[]|string $feature The feature to check. This is in the form of a namespaced class. return: bool |
get_supported_features() X-Ref |
Get a list of the features supported by this client. return: string[] |
require_feature(array|string $feature) X-Ref |
Require that the API supports a feature. If an Array is provided, this is treated as a require any of the features. param: string[]|string $feature The feature to test |
require_features(array $features) X-Ref |
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. param: string[]|array[] $features The list of features required |
get_server_url() X-Ref |
Get the URL of the server. return: string |
query_server_supports(string $serverurl) X-Ref |
Query the supported versions, and any unstable features, from the server. Servers must implement the client versions API described here: - https://spec.matrix.org/latest/client-server-api/#get_matrixclientversions param: string $serverurl The server base return: \stdClass The list of supported versions and a list of enabled unstable features |
get_supported_versions() X-Ref |
Get the list of supported versions based on the available classes. return: array |
get_token() X-Ref |
Get the current token in use. return: string |
get_client() X-Ref |
Helper to fetch the HTTP Client for the instance. return: \core\http_client |
get_http_client() X-Ref |
Helper to fetch the HTTP Client. return: \core\http_client |
execute(command $command,) X-Ref |
Execute the specified command. param: command $command return: Response |
get_version() X-Ref |
Get the API version of the current instance. return: string |
get_version_from_classname(string $classname) X-Ref |
Normalise an API version from a classname. param: string $classname The short classname, omitting any namespace or file extension return: string The normalised version |
meets_version(string $minversion) X-Ref |
Check if the API version is at least the specified version. param: string $minversion The minimum API version required return: bool |
requires_version(string $minversion) X-Ref |
Assert that the API version is at least the specified version. param: string $minversion The minimum API version required |