Bitrix API

ContentUri extends Uri

FinalYes

Class ContentUri marks uri which provides content (file content).

It gives chance to process uri by some rest application without any bearer tokens. So, module "rest" converts ContentUri to two items. One of them is original uri and second is machine uri.

Table of Contents

Methods

__construct()  : mixed
__toString()  : string
addParams()  : $this
Adds parameters to query or replaces existing ones.
convertToPunycode()  : string|Error
Converts the host to punycode.
convertToUnicode()  : string|Error
Converts the host to Unicode.
deleteParams()  : $this
Deletes parameters from the query.
getAuthority()  : string
getFragment()  : string
getHost()  : string
getLocator()  : string
Return the URI without a fragment.
getPass()  : string
Returns the rawurlencoded password.
getPath()  : string
getPathQuery()  : string
Returns the path with the query.
getPort()  : int|null
getQuery()  : string
getScheme()  : string
getUri()  : string
Return the URI with a fragment, if any.
getUrl()  : mixed
getUser()  : string
Returns the rawurlencoded user.
getUserInfo()  : string
isPathTraversal()  : bool
Searches for /../ and ulrencoded /../
jsonSerialize()  : string
Specify data which should be serialized to JSON
resolveRelativeUri()  : $this
Converts the relative URI to the absolute one within a context of a base URI.
setHost()  : $this
Sets the host
setPass()  : $this
Decodes and sets the password.
setPath()  : $this
Sets the path.
setUser()  : $this
Decodes and sets the user.
toAbsolute()  : $this
Converts a relative uri to the absolute one using given host name or the host from the current context server object.
urnDecode()  : string
Decodes the URI string without parsing it.
urnEncode()  : string
Encodes the URI string without parsing it.
withFragment()  : UriInterface
withHost()  : UriInterface
withPath()  : UriInterface
withPort()  : UriInterface
withQuery()  : UriInterface
withScheme()  : UriInterface
withUserInfo()  : UriInterface

Methods

__construct()

public __construct(string $url) : mixed
Parameters
$url : string

__toString()

public __toString() : string
Tags
inheritdoc
Return values
string

addParams()

Adds parameters to query or replaces existing ones.

public addParams(array<string|int, mixed> $params[, bool $preserveDots = false ]) : $this
Parameters
$params : array<string|int, mixed>

Parameters to add.

$preserveDots : bool = false

Special treatment of dots and spaces in the parameters names.

Return values
$this

convertToPunycode()

Converts the host to punycode.

public convertToPunycode() : string|Error
Return values
string|Error

convertToUnicode()

Converts the host to Unicode.

public convertToUnicode() : string|Error
Return values
string|Error

deleteParams()

Deletes parameters from the query.

public deleteParams(array<string|int, mixed> $params[, bool $preserveDots = false ]) : $this
Parameters
$params : array<string|int, mixed>

Parameters to delete.

$preserveDots : bool = false

Special treatment of dots and spaces in the parameters names.

Return values
$this

getAuthority()

public getAuthority() : string
Tags
inheritdoc
Return values
string

getFragment()

public getFragment() : string
Tags
inheritdoc
Return values
string

getHost()

public getHost() : string
Tags
inheritdoc
Return values
string

getLocator()

Return the URI without a fragment.

public getLocator() : string
Return values
string

getPass()

Returns the rawurlencoded password.

public getPass() : string
Return values
string

getPath()

public getPath() : string
Tags
inheritdoc
Return values
string

getPathQuery()

Returns the path with the query.

public getPathQuery() : string
Return values
string

getPort()

public getPort() : int|null
Tags
inheritdoc
Return values
int|null

getQuery()

public getQuery() : string
Tags
inheritdoc
Return values
string

getScheme()

public getScheme() : string
Tags
inheritdoc
Return values
string

getUri()

Return the URI with a fragment, if any.

public getUri() : string
Return values
string

getUrl()

public getUrl() : mixed

Use getLocator() or getUri().

getUser()

Returns the rawurlencoded user.

public getUser() : string
Return values
string

getUserInfo()

public getUserInfo() : string
Tags
inheritdoc
Return values
string

isPathTraversal()

Searches for /../ and ulrencoded /../

public isPathTraversal() : bool
Return values
bool

setHost()

Sets the host

public setHost(string $host) : $this
Parameters
$host : string

Host name.

Return values
$this

setPass()

Decodes and sets the password.

public setPass(string $pass) : $this
Parameters
$pass : string

Password,

Return values
$this

setPath()

Sets the path.

public setPath(string $path) : $this
Parameters
$path : string
Return values
$this

setUser()

Decodes and sets the user.

public setUser(string $user) : $this
Parameters
$user : string

User.

Return values
$this

toAbsolute()

Converts a relative uri to the absolute one using given host name or the host from the current context server object.

public toAbsolute([string|null $host = null ]) : $this
Parameters
$host : string|null = null
Return values
$this

urnDecode()

Decodes the URI string without parsing it.

public static urnDecode(mixed $str[, mixed $charset = false ]) : string
Parameters
$str : mixed
$charset : mixed = false
Return values
string

urnEncode()

Encodes the URI string without parsing it.

public static urnEncode(mixed $str[, mixed $charset = 'UTF-8' ]) : string
Parameters
$str : mixed
$charset : mixed = 'UTF-8'
Return values
string

withFragment()

public withFragment(string $fragment) : UriInterface
Parameters
$fragment : string
Tags
inheritdoc
Return values
UriInterface

withHost()

public withHost(string $host) : UriInterface
Parameters
$host : string
Tags
inheritdoc
Return values
UriInterface

withPath()

public withPath(string $path) : UriInterface
Parameters
$path : string
Tags
inheritdoc
Return values
UriInterface

withPort()

public withPort(int|null $port) : UriInterface
Parameters
$port : int|null
Tags
inheritdoc
Return values
UriInterface

withQuery()

public withQuery(string $query) : UriInterface
Parameters
$query : string
Tags
inheritdoc
Return values
UriInterface

withScheme()

public withScheme(string $scheme) : UriInterface
Parameters
$scheme : string
Tags
inheritdoc
Return values
UriInterface

withUserInfo()

public withUserInfo(string $user[, string|null $password = null ]) : UriInterface
Parameters
$user : string
$password : string|null = null
Tags
inheritdoc
Return values
UriInterface

        
On this page

Search results