CSServerUtils
in package
Tags
Table of Contents
- SERVER_PORT_HTTP = 80
- Defines the various server ports.
- SERVER_PORT_HTTPS = 443
- createBaseUrl() : string
- Creates a base url for the given parameter.
- getExternalServerBasePath() : string
- Returns the external server base path.
- getExternalServerBaseUrl() : string
- Returns the external server base url.
- getExternalServerName() : string
- Returns the external server name.
- getExternalServerPort() : int
- Returns the external server port.
- getExternalServerProtocol() : string
- Returns the external server protocol.
- getInternalServerBasePath() : string
- Returns the internal server base path.
- getInternalServerBaseUrl() : string
- Returns the internal server base url.
- getInternalServerDefaultNames() : array<string|int, string>
- Returns an array of the default internal server names.
- getInternalServerName() : string
- Returns the internal server name.
- getInternalServerPassword() : string
- Returns the internal server user password of the webserver.
- getInternalServerPort() : int
- Returns the internal server port.
- getInternalServerProtocol() : string
- Returns the internal server protocol.
- getInternalServerUser() : string
- Returns the internal server user name of the webserver.
- getLicenseServerName() : array<string|int, mixed>|string
- Returns either an array with all given server names from CS License given for server name and alternative server name or a string with the server name
- getRequestBaseUrl() : string
- Returns the current request base url.
- getServerBasePath() : string
- Returns the server base path for the current request.
- getServerBaseUrl() : string
- Returns the server base url for the current request.
- getServerId() : string
- Returns the unique server id.
- getServerName() : string
- Returns the server name used for the current request.
- getServerPort() : int
- Returns the current server port.
- getServerProtocol() : string
- Returns the server protocol used for the current request
- isHttps() : bool
- Returns TRUE if the server protocol used for the current request is https
Constants
SERVER_PORT_HTTP
Defines the various server ports.
public
int
SERVER_PORT_HTTP
= 80
Tags
SERVER_PORT_HTTPS
public
mixed
SERVER_PORT_HTTPS
= 443
Tags
Methods
createBaseUrl()
Creates a base url for the given parameter.
public
static createBaseUrl(string $sProtocol, string $sServerName, int $iPort, string $sBasePath) : string
Parameters
- $sProtocol : string
- $sServerName : string
- $iPort : int
- $sBasePath : string
Tags
Return values
string —getExternalServerBasePath()
Returns the external server base path.
public
static getExternalServerBasePath() : string
Tags
Return values
string —getExternalServerBaseUrl()
Returns the external server base url.
public
static getExternalServerBaseUrl() : string
Tags
Return values
string —getExternalServerName()
Returns the external server name.
public
static getExternalServerName() : string
Tags
Return values
string —getExternalServerPort()
Returns the external server port.
public
static getExternalServerPort() : int
Tags
Return values
int —getExternalServerProtocol()
Returns the external server protocol.
public
static getExternalServerProtocol() : string
Tags
Return values
string —getInternalServerBasePath()
Returns the internal server base path.
public
static getInternalServerBasePath() : string
Tags
Return values
string —getInternalServerBaseUrl()
Returns the internal server base url.
public
static getInternalServerBaseUrl() : string
Tags
Return values
string —getInternalServerDefaultNames()
Returns an array of the default internal server names.
public
static getInternalServerDefaultNames() : array<string|int, string>
Tags
Return values
array<string|int, string> —getInternalServerName()
Returns the internal server name.
public
static getInternalServerName() : string
Tags
Return values
string —getInternalServerPassword()
Returns the internal server user password of the webserver.
public
static getInternalServerPassword() : string
Tags
Return values
string —getInternalServerPort()
Returns the internal server port.
public
static getInternalServerPort() : int
Tags
Return values
int —getInternalServerProtocol()
Returns the internal server protocol.
public
static getInternalServerProtocol() : string
Tags
Return values
string —getInternalServerUser()
Returns the internal server user name of the webserver.
public
static getInternalServerUser() : string
Tags
Return values
string —getLicenseServerName()
Returns either an array with all given server names from CS License given for server name and alternative server name or a string with the server name
public
static getLicenseServerName([bool $bIncludeAlternativeNames = false ]) : array<string|int, mixed>|string
Parameters
- $bIncludeAlternativeNames : bool = false
-
true to get an array containing all server names from CS License
Tags
Return values
array<string|int, mixed>|string —getRequestBaseUrl()
Returns the current request base url.
public
static getRequestBaseUrl() : string
Tags
Return values
string —getServerBasePath()
Returns the server base path for the current request.
public
static getServerBasePath([bool $bUseOldDetection = false ]) : string
Parameters
- $bUseOldDetection : bool = false
-
If the old detection method should be used.
Tags
Return values
string —getServerBaseUrl()
Returns the server base url for the current request.
public
static getServerBaseUrl() : string
Tags
Return values
string —getServerId()
Returns the unique server id.
public
static getServerId() : string
Tags
Return values
string —getServerName()
Returns the server name used for the current request.
public
static getServerName() : string
Tags
Return values
string —getServerPort()
Returns the current server port.
public
static getServerPort() : int
Tags
Return values
int —getServerProtocol()
Returns the server protocol used for the current request
public
static getServerProtocol() : string
Tags
Return values
string —https | http
isHttps()
Returns TRUE if the server protocol used for the current request is https
public
static isHttps() : bool
Tags
Return values
bool —true if https
