Bitrix API

Server extends ParameterDictionary

Represents server.

Table of Contents

Methods

__construct()  : mixed
Creates server object.
__unserialize()  : void
addFilter()  : mixed
clear()  : mixed
get()  : string|array<string|int, mixed>|null
Returns any variable by its name. Null if variable is not set.
getDocumentRoot()  : string|null
Returns server document root.
getHttpHost()  : string|null
Returns server http host.
getPersonalRoot()  : string|null
Returns custom root folder.
getPhpSelf()  : string|null
Returns PHP_SELF.
getRaw()  : string|null
Returns original value of any variable by its name. Null if variable is not set.
getRemoteAddr()  : string|null
Returns remote address.
getRequestMethod()  : string|null
Returns requested method.
getRequestScheme()  : mixed
getRequestUri()  : string|null
Returns requested uri.
getScriptName()  : string|null
Returns SCRIPT_NAME.
getServerAddr()  : string|null
Returns server address.
getServerName()  : string|null
Returns server name.
getServerPort()  : string|null
Returns server port.
getUserAgent()  : string|null
Returns user agent.
getValues()  : array<string|int, mixed>
isEmpty()  : bool
Returns true if the dictionary is empty.
jsonSerialize()  : array<string|int, mixed>
JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON
offsetSet()  : mixed
Offset to set
offsetUnset()  : void
Offset to unset
parseAuthRequest()  : array<string|int, mixed>|false
rewriteUri()  : mixed
set()  : mixed
setValues()  : mixed
toArray()  : array<string|int, mixed>
Returns the values as an array.
toArrayRaw()  : mixed
transferUri()  : mixed

Methods

__construct()

Creates server object.

public __construct(array<string|int, mixed> $arServer) : mixed
Parameters
$arServer : array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

get()

Returns any variable by its name. Null if variable is not set.

public get(string $name) : string|array<string|int, mixed>|null
Parameters
$name : string
Return values
string|array<string|int, mixed>|null

getDocumentRoot()

Returns server document root.

public getDocumentRoot() : string|null
Return values
string|null

getHttpHost()

Returns server http host.

public getHttpHost() : string|null
Return values
string|null

getPersonalRoot()

Returns custom root folder.

public getPersonalRoot() : string|null

Server variable BX_PERSONAL_ROOT is used. If empty - returns /bitrix.

Return values
string|null

getPhpSelf()

Returns PHP_SELF.

public getPhpSelf() : string|null

/index.php/test1/test2

Return values
string|null

getRaw()

Returns original value of any variable by its name. Null if variable is not set.

public getRaw(string $name) : string|null
Parameters
$name : string
Return values
string|null

getRemoteAddr()

Returns remote address.

public getRemoteAddr() : string|null
Return values
string|null

getRequestMethod()

Returns requested method.

public getRequestMethod() : string|null
Return values
string|null

getRequestScheme()

public getRequestScheme() : mixed

getRequestUri()

Returns requested uri.

public getRequestUri() : string|null

/index.php/test1/test2?login=yes&back_url_admin=/

Return values
string|null

getScriptName()

Returns SCRIPT_NAME.

public getScriptName() : string|null

/index.php

Return values
string|null

getServerAddr()

Returns server address.

public getServerAddr() : string|null
Return values
string|null

getServerName()

Returns server name.

public getServerName() : string|null
Return values
string|null

getServerPort()

Returns server port.

public getServerPort() : string|null
Return values
string|null

getUserAgent()

Returns user agent.

public getUserAgent() : string|null
Return values
string|null

getValues()

public getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

isEmpty()

Returns true if the dictionary is empty.

public isEmpty() : bool
Return values
bool

jsonSerialize()

JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON

public jsonSerialize() : array<string|int, mixed>
Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed>

offsetSet()

Offset to set

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed

offsetUnset()

Offset to unset

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

parseAuthRequest()

public parseAuthRequest() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false

rewriteUri()

public rewriteUri(mixed $url, mixed $queryString[, mixed $redirectStatus = null ]) : mixed
Parameters
$url : mixed
$queryString : mixed
$redirectStatus : mixed = null

set()

public set(mixed $name[, mixed $value = null ]) : mixed
Parameters
$name : mixed
$value : mixed = null

toArray()

Returns the values as an array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

transferUri()

public transferUri(mixed $url[, mixed $queryString = "" ]) : mixed
Parameters
$url : mixed
$queryString : mixed = ""

        
On this page

Search results