Abstraction for an HTTP user agent
Methods | ||
---|---|---|
public
|
__construct(?UserAgents $config = null)
|
# |
public
|
isBrowser(string $key = null): bool
|
# |
public
|
isRobot(string $key = null): bool
|
# |
public
|
isMobile(string $key = null): bool
|
# |
public
|
isReferral(): bool
|
# |
public
|
getAgentString(): string
|
# |
public
|
getPlatform(): string
|
# |
public
|
getBrowser(): string
|
# |
public
|
getVersion(): string
|
# |
public
|
getRobot(): string
|
# |
public
|
getMobile(): string
|
# |
public
|
getReferrer(): string
|
# |
public
|
parse(string $string)
|
# |
protected
|
compileData()
|
# |
protected
|
setPlatform(): bool
|
# |
protected
|
setBrowser(): bool
|
# |
protected
|
setRobot(): bool
|
# |
protected
|
setMobile(): bool
|
# |
public
|
__toString(): string
|
# |
Properties | |||
---|---|---|---|
protected
|
string
|
$agent = ''
|
# |
protected
|
bool
|
$isBrowser = false
|
# |
protected
|
bool
|
$isRobot = false
|
# |
protected
|
bool
|
$isMobile = false
|
# |
protected
|
UserAgents
|
$config
|
# |
protected
|
string
|
$platform = ''
|
# |
protected
|
string
|
$browser = ''
|
# |
protected
|
string
|
$version = ''
|
# |
protected
|
string
|
$mobile = ''
|
# |
protected
|
string
|
$robot = ''
|
# |
protected
|
mixed
|
$referrer
|
# |