class Platform (View source)

The Platform class.

Methods

__construct(array $server = array())

Platform constructor.

boolean
isWeb()

isWeb

boolean
isCli()

isCli

string
getOS()

getOS

bool
isWin()

isWin

bool
isUnix()

isUnix

bool
isLinux()

isLinux

setOS(string $os)

Method to set property os

string
getUname()

Method to get property Uname

setUname(string $uname)

Method to set property uname

string
getWorkingDirectory()

getWorkingDirectory

string
getRoot(bool $full = true)

getRoot

string
getServerPublicRoot()

getDocumentRoot

string
getEntry(bool $full = true)

getEntry

string
getRequestUri(bool $withParams = true)

getRequestUri

string
getHost()

getHost

string
getPort()

getPort

string
getScheme()

getScheme

Details

at line line 44
__construct(array $server = array())

Platform constructor.

Parameters

array $server

at line line 54
boolean isWeb()

isWeb

Return Value

boolean

at line line 64
boolean isCli()

isCli

Return Value

boolean

at line line 76
string getOS()

getOS

Return Value

string

See also

https://gist.github.com/asika32764/90e49a82c124858c9e1a

at line line 92
bool isWin()

isWin

Return Value

bool

at line line 104
bool isUnix()

isUnix

Return Value

bool

See also

https://gist.github.com/asika32764/90e49a82c124858c9e1a

at line line 127
bool isLinux()

isLinux

Return Value

bool

at line line 139
Platform setOS(string $os)

Method to set property os

Parameters

string $os

Return Value

Platform Return self to support chaining.

at line line 151
string getUname()

Method to get property Uname

Return Value

string

at line line 163
Platform setUname(string $uname)

Method to set property uname

Parameters

string $uname

Return Value

Platform Return self to support chaining.

at line line 175
string getWorkingDirectory()

getWorkingDirectory

Return Value

string

at line line 187
string getRoot(bool $full = true)

getRoot

Parameters

bool $full

Return Value

string

at line line 197
string getServerPublicRoot()

getDocumentRoot

Return Value

string

at line line 209
string getEntry(bool $full = true)

getEntry

Parameters

bool $full

Return Value

string

at line line 239
string getRequestUri(bool $withParams = true)

getRequestUri

Parameters

bool $withParams

Return Value

string

at line line 254
string getHost()

getHost

Return Value

string

at line line 264
string getPort()

getPort

Return Value

string

at line line 274
string getScheme()

getScheme

Return Value

string