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>
addFilter()
public
addFilter(IRequestFilter $filter) : mixed
Parameters
- $filter : IRequestFilter
clear()
public
clear() : 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>|nullgetDocumentRoot()
Returns server document root.
public
getDocumentRoot() : string|null
Return values
string|nullgetHttpHost()
Returns server http host.
public
getHttpHost() : string|null
Return values
string|nullgetPersonalRoot()
Returns custom root folder.
public
getPersonalRoot() : string|null
Server variable BX_PERSONAL_ROOT is used. If empty - returns /bitrix.
Return values
string|nullgetPhpSelf()
Returns PHP_SELF.
public
getPhpSelf() : string|null
/index.php/test1/test2
Return values
string|nullgetRaw()
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|nullgetRemoteAddr()
Returns remote address.
public
getRemoteAddr() : string|null
Return values
string|nullgetRequestMethod()
Returns requested method.
public
getRequestMethod() : string|null
Return values
string|nullgetRequestScheme()
public
getRequestScheme() : mixed
getRequestUri()
Returns requested uri.
public
getRequestUri() : string|null
/index.php/test1/test2?login=yes&back_url_admin=/
Return values
string|nullgetScriptName()
Returns SCRIPT_NAME.
public
getScriptName() : string|null
/index.php
Return values
string|nullgetServerAddr()
Returns server address.
public
getServerAddr() : string|null
Return values
string|nullgetServerName()
Returns server name.
public
getServerName() : string|null
Return values
string|nullgetServerPort()
Returns server port.
public
getServerPort() : string|null
Return values
string|nullgetUserAgent()
Returns user agent.
public
getUserAgent() : string|null
Return values
string|nullgetValues()
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
booljsonSerialize()
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>|falserewriteUri()
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
setValues()
public
setValues(mixed $values) : mixed
Parameters
- $values : mixed
toArray()
Returns the values as an array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toArrayRaw()
public
toArrayRaw() : mixed
transferUri()
public
transferUri(mixed $url[, mixed $queryString = "" ]) : mixed
Parameters
- $url : mixed
- $queryString : mixed = ""