프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$clientTypes | array | Holds all registered client types |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$bot | array | boolean | If $discardBotInformation is set to true, this property will be set to true if parsed UA is identified as bot, additional information will be not available If $skipBotDetection is set to true, bot detection will not be performed and isBot will always be false | |
$brand | string | Holds the device brand data after parsing the UA | |
$cache | DeviceDetector\Cache\Cache | |
Holds the cache class used for caching the parsed yml-Files | |
$client | array | Holds the client data after parsing the UA | |
$clientParsers | DeviceDetector\Parser\Client\ClientParserAbstract[] | ||
$desktopOsArray | array | Operating system families that are known as desktop only | |
$device | string | Holds the device type after parsing the UA | |
$deviceParsers | |||
$discardBotInformation | boolean | ||
$model | string | Holds the device model data after parsing the UA | |
$os | array | Holds the operating system data after parsing the UA | |
$skipBotDetection | boolean | ||
$userAgent | string | Holds the useragent that should be parsed | |
$yamlParser | DeviceDetector\Yaml\Parser | Holds the parser class used for parsing yml-Files |
메소드 | 설명 | |
---|---|---|
__call ( $methodName, $arguments ) | ||
__construct ( string $userAgent = '' ) | Constructor | |
addClientParser ( DeviceDetector\Parser\Client\ClientParserAbstract | string $parser ) | ||
addDeviceParser ( |
||
discardBotInformation ( boolean $discard = true ) | Sets whether to discard additional bot information If information is discarded it's only possible check whether UA was detected as bot or not. | |
getBot ( ) : array | Returns the bot extracted from the parsed UA | |
getBrand ( ) : string | Returns the device brand extracted from the parsed UA | |
getBrandName ( ) : string | Returns the full device brand name extracted from the parsed UA | |
getCache ( ) : |
Returns Cache object | |
getClient ( string $attr = '' ) : array | string | Returns the client data extracted from the parsed UA | |
getClientParsers ( ) | ||
getDevice ( ) : integer | null | Returns the device type extracted from the parsed UA | |
getDeviceName ( ) : string | Returns the device type extracted from the parsed UA | |
getDeviceParsers ( ) | ||
getInfoFromUserAgent ( string $ua ) : array | Parses a useragent and returns the detected data | |
getModel ( ) : string | Returns the device model extracted from the parsed UA | |
getOs ( string $attr = '' ) : array | string | Returns the operating system data extracted from the parsed UA | |
getUserAgent ( ) : string | Returns the user agent that is set to be parsed | |
getYamlParser ( ) : DeviceDetector\Yaml\Parser | Returns Yaml Parser object | |
isBot ( ) : boolean | Returns if the parsed UA was identified as a Bot | |
isDesktop ( ) : boolean | Returns if the parsed UA was identified as desktop device Desktop devices are all devices with an unknown type that are running a desktop os | |
isMobile ( ) | ||
isParsed ( ) : boolean | Returns true, if userAgent was already parsed with parse() | |
isTouchEnabled ( ) : boolean | Returns if the parsed UA was identified as a touch enabled device | |
parse ( ) | Triggers the parsing of the current user agent | |
setCache ( DeviceDetector\Cache\Cache | |
Sets the Cache class | |
setUserAgent ( string $userAgent ) | Sets the useragent to be parsed | |
setYamlParser ( $yamlParser ) | Sets the Yaml Parser class | |
skipBotDetection ( boolean $skip = true ) | Sets whether to skip bot detection. |
메소드 | 설명 | |
---|---|---|
hasAndroidMobileFragment ( ) : boolean | Returns if the parsed UA contains the 'Android; Mobile;' fragment | |
hasAndroidTableFragment ( ) : boolean | Returns if the parsed UA contains the 'Android; Tablet;' fragment | |
matchUserAgent ( $regex ) | ||
parseBot ( ) | Parses the UA for bot information using the Bot parser | |
parseClient ( ) | ||
parseDevice ( ) | ||
parseOs ( ) | ||
reset ( ) | ||
usesMobileBrowser ( ) |
public __construct ( string $userAgent = '' ) | ||
$userAgent | string | UA to parse |
public addClientParser ( DeviceDetector\Parser\Client\ClientParserAbstract | string $parser ) | ||
$parser | DeviceDetector\Parser\Client\ClientParserAbstract | string |
public addDeviceParser ( |
||
$parser |
public discardBotInformation ( boolean $discard = true ) | ||
$discard | boolean |
public getBrandName ( ) : string | ||
리턴 | string |
public getCache ( ) : |
||
리턴 |
public getDeviceName ( ) : string | ||
리턴 | string |
public static getInfoFromUserAgent ( string $ua ) : array | ||
$ua | string | UserAgent to parse |
리턴 | array |
public getUserAgent ( ) : string | ||
리턴 | string |
public getYamlParser ( ) : DeviceDetector\Yaml\Parser | ||
리턴 | DeviceDetector\Yaml\Parser |
protected hasAndroidMobileFragment ( ) : boolean | ||
리턴 | boolean |
protected hasAndroidTableFragment ( ) : boolean | ||
리턴 | boolean |
public isTouchEnabled ( ) : boolean | ||
리턴 | boolean |
public setCache ( DeviceDetector\Cache\Cache | |
||
$cache | DeviceDetector\Cache\Cache | |
public setUserAgent ( string $userAgent ) | ||
$userAgent | string |
public skipBotDetection ( boolean $skip = true ) | ||
$skip | boolean |
protected string $brand | ||
리턴 | string |
protected Cache,DeviceDetector\Cache|CacheProvider,Doctrine\Common\Cache $cache | ||
리턴 | DeviceDetector\Cache\Cache | |
protected ClientParserAbstract[],DeviceDetector\Parser\Client $clientParsers | ||
리턴 | DeviceDetector\Parser\Client\ClientParserAbstract[] |
public static array $clientTypes | ||
리턴 | array |
protected static array $desktopOsArray | ||
리턴 | array |
protected DeviceParserAbstract[],DeviceDetector\Parser\Device $deviceParsers | ||
리턴 |
protected string $model | ||
리턴 | string |
protected string $userAgent | ||
리턴 | string |