Content_URI
in package
This class describes Matrix media URI.
Table of Contents
Properties
- $uri : string
- Content URI in the format mxc://<server-name>/<media-id>
Methods
- __construct() : mixed
- get_media_id() : string|null
- Get the media ID part of the URI.
- get_protocol() : string|null
- Get the protocol from the URI. With a valid URI, should be always "MXC".
- get_server_name() : string|null
- Get the server part of the URI.
- is_valid() : bool
- Check if the URI is valid.
- to_string() : string
- Get the URI string.
Properties
$uri
Content URI in the format mxc://<server-name>/<media-id>
private
string
$uri
Methods
__construct()
public
__construct( $uri) : mixed
Parameters
get_media_id()
Get the media ID part of the URI.
public
get_media_id() : string|null
Return values
string|null —A media ID.
get_protocol()
Get the protocol from the URI. With a valid URI, should be always "MXC".
public
get_protocol() : string|null
Return values
string|null —A protocol string.
get_server_name()
Get the server part of the URI.
public
get_server_name() : string|null
Return values
string|null —A server name.
is_valid()
Check if the URI is valid.
public
is_valid() : bool
Return values
bool —true if it is valid, false otherwise.
to_string()
Get the URI string.
public
to_string() : string
Return values
string —The URI string.