|
1C-Bitrix 25.700.0
|
Открытые члены | |
| __construct (array $headers=null, $userAgent=null) | |
| setHttpHeaders ($httpHeaders=null) | |
| getHttpHeaders () | |
| getHttpHeader ($header) | |
| getMobileHeaders () | |
| getUaHttpHeaders () | |
| setUserAgent ($userAgent=null) | |
| getUserAgent () | |
| setDetectionType ($type=null) | |
| getMatchingRegex () | |
| getMatchesArray () | |
| getMobileDetectionRulesExtended () | |
| getRules () | |
| checkHttpHeadersForMobile () | |
| __call ($name, $arguments) | |
| isMobile ($userAgent=null, $httpHeaders=null) | |
| isTablet ($userAgent=null, $httpHeaders=null) | |
| is ($key, $userAgent=null, $httpHeaders=null) | |
| match ($regex, $userAgent=null) | |
| prepareVersionNo ($ver) | |
| version ($propertyName, $type=self::VERSION_TYPE_STRING) | |
| mobileGrade () | |
Открытые статические члены | |
| static | getScriptVersion () |
| static | getPhoneDevices () |
| static | getTabletDevices () |
| static | getUserAgents () |
| static | getBrowsers () |
| static | getUtilities () |
| static | getMobileDetectionRules () |
| static | getOperatingSystems () |
| static | getProperties () |
Поля данных | |
| const | DETECTION_TYPE_MOBILE = 'mobile' |
| const | DETECTION_TYPE_EXTENDED = 'extended' |
| const | VER = '([\w._\+]+)' |
| const | MOBILE_GRADE_A = 'A' |
| const | MOBILE_GRADE_B = 'B' |
| const | MOBILE_GRADE_C = 'C' |
| const | VERSION = '2.8.13' |
| const | VERSION_TYPE_STRING = 'text' |
| const | VERSION_TYPE_FLOAT = 'float' |
Защищенные члены | |
| matchDetectionRulesAgainstUA ($userAgent=null) | |
| matchUAAgainstKey ($key) | |
Защищенные данные | |
| $cache = array() | |
| $userAgent = null | |
| $httpHeaders = array() | |
| $matchingRegex = null | |
| $matchesArray = null | |
| $detectionType = self::DETECTION_TYPE_MOBILE | |
Статические защищенные данные | |
| static | $mobileHeaders |
| static | $phoneDevices |
| static | $tabletDevices |
| static | $operatingSystems |
| static | $browsers |
| static | $utilities |
| static | $uaHttpHeaders |
| static | $properties |
См. определение в файле mobiledetect.php строка 32
| __construct | ( | array | $headers = null, |
| $userAgent = null ) |
Construct an instance of this class.
| array | $headers | Specify the headers as injection. Should be PHP SERVER flavored. If left empty, will use the global _SERVER['HTTP*'] vars instead. |
| string | $userAgent | Inject the User-Agent header. If null, will use HTTP_USER_AGENT from the $headers array instead. |
См. определение в файле mobiledetect.php строка 643
| __call | ( | $name, | |
| $arguments ) |
Magic overloading method.
@method boolean is[...]()
| string | $name | |
| array | $arguments |
| BadMethodCallException | when the method doesn't exist and doesn't start with 'is' |
См. определение в файле mobiledetect.php строка 982
| checkHttpHeadersForMobile | ( | ) |
Check the HTTP headers for signs of mobile. This is the fastest mobile check possible; it's used inside isMobile() method.
См. определение в файле mobiledetect.php строка 950
|
static |
Retrieve the list of known browsers. Specifically, the user agents.
См. определение в файле mobiledetect.php строка 850
| getHttpHeader | ( | $header | ) |
Retrieves a particular header. If it doesn't exist, no exception/error is caused. Simply null is returned.
| string | $header | The name of the header to retrieve. Can be HTTP compliant such as "User-Agent" or "X-Device-User-Agent" or can be php-esque with the all-caps, HTTP_ prefixed, underscore seperated awesomeness. |
См. определение в файле mobiledetect.php строка 709
| getHttpHeaders | ( | ) |
| getMatchesArray | ( | ) |
См. определение в файле mobiledetect.php строка 810
| getMatchingRegex | ( | ) |
См. определение в файле mobiledetect.php строка 805
|
static |
Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
См. определение в файле mobiledetect.php строка 872
| getMobileDetectionRulesExtended | ( | ) |
Method gets the mobile detection rules + utilities. The reason this is separate is because utilities rules don't necessary imply mobile. This method is used inside the new $detect->is('stuff') method.
См. определение в файле mobiledetect.php строка 899
| getMobileHeaders | ( | ) |
См. определение в файле mobiledetect.php строка 730
|
static |
Retrieve the list of mobile operating systems.
См. определение в файле mobiledetect.php строка 938
|
static |
Retrieve the list of known phone devices.
См. определение в файле mobiledetect.php строка 820
|
static |
| getRules | ( | ) |
Retrieve the current set of rules.
См. определение в файле mobiledetect.php строка 924
|
static |
Get the current script version. This is useful for the demo.php file, so people can check on what version they are testing for mobile devices.
См. определение в файле mobiledetect.php строка 659
|
static |
Retrieve the list of known tablet devices.
См. определение в файле mobiledetect.php строка 830
| getUaHttpHeaders | ( | ) |
Get all possible HTTP headers that can contain the User-Agent string.
См. определение в файле mobiledetect.php строка 741
| getUserAgent | ( | ) |
Retrieve the User-Agent.
См. определение в файле mobiledetect.php строка 778
|
static |
Alias for getBrowsers() method.
См. определение в файле mobiledetect.php строка 840
|
static |
Retrieve the list of known utilities.
См. определение в файле mobiledetect.php строка 860
| is | ( | $key, | |
| $userAgent = null, | |||
| $httpHeaders = null ) |
This method checks for a certain property in the userAgent.
| string | $key | |
| string | $userAgent | deprecated |
| string | $httpHeaders | deprecated |
См. определение в файле mobiledetect.php строка 1107
| isMobile | ( | $userAgent = null, | |
| $httpHeaders = null ) |
Check if the device is mobile. Returns true if any type of mobile device detected, including special ones
| null | $userAgent | deprecated |
| null | $httpHeaders | deprecated |
См. определение в файле mobiledetect.php строка 1055
| isTablet | ( | $userAgent = null, | |
| $httpHeaders = null ) |
Check if the device is a tablet. Return true if any type of tablet device is detected.
| string | $userAgent | deprecated |
| array | $httpHeaders | deprecated |
См. определение в файле mobiledetect.php строка 1084
| match | ( | $regex, | |
| $userAgent = null ) |
Some detection rules are relative (not standard), because of the diversity of devices, vendors and their conventions in representing the User-Agent or the HTTP headers.
This method will be used to check custom regexes against the User-Agent string.
| $regex | ||
| string | $userAgent |
См. определение в файле mobiledetect.php строка 1138
|
protected |
Find a detection rule that matches the current User-agent.
| null | $userAgent | deprecated |
См. определение в файле mobiledetect.php строка 1002
|
protected |
Search for a certain key in the rules array. If the key is found the try to match the corresponding regex against the User-Agent.
| string | $key |
См. определение в файле mobiledetect.php строка 1027
| mobileGrade | ( | ) |
Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
См. определение в файле mobiledetect.php строка 1239
| prepareVersionNo | ( | $ver | ) |
Prepare the version number.
| string | $ver | The string version, like "2.6.21.2152"; |
См. определение в файле mobiledetect.php строка 1169
| setDetectionType | ( | $type = null | ) |
Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
| string | $type | The type. Must be a self::DETECTION_TYPE_* constant. The default parameter is null which will default to self::DETECTION_TYPE_MOBILE. |
См. определение в файле mobiledetect.php строка 792
| setHttpHeaders | ( | $httpHeaders = null | ) |
Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
| array | $httpHeaders | The headers to set. If null, then using PHP's _SERVER to extract the headers. The default null is left for backwards compatibilty. |
См. определение в файле mobiledetect.php строка 670
| setUserAgent | ( | $userAgent = null | ) |
Set the User-Agent to be used.
| string | $userAgent | The user agent string to set. |
См. определение в файле mobiledetect.php строка 753
| version | ( | $propertyName, | |
| $type = self::VERSION_TYPE_STRING ) |
Check the version of the given property in the User-Agent. Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
| string | $propertyName | The name of the property. See self::getProperties() array keys for all possible properties. |
| string | $type | Either self::VERSION_TYPE_STRING to get a string value or self::VERSION_TYPE_FLOAT indicating a float value. This parameter is optional and defaults to self::VERSION_TYPE_STRING. Passing an invalid parameter will default to the this type as well. |
См. определение в файле mobiledetect.php строка 1194
|
staticprotected |
См. определение в файле mobiledetect.php строка 489
|
protected |
См. определение в файле mobiledetect.php строка 89
|
protected |
См. определение в файле mobiledetect.php строка 124
|
protected |
См. определение в файле mobiledetect.php строка 101
|
protected |
См. определение в файле mobiledetect.php строка 115
|
protected |
См. определение в файле mobiledetect.php строка 108
|
staticprotected |
См. определение в файле mobiledetect.php строка 132
|
staticprotected |
См. определение в файле mobiledetect.php строка 459
|
staticprotected |
См. определение в файле mobiledetect.php строка 167
|
staticprotected |
См. определение в файле mobiledetect.php строка 569
|
staticprotected |
См. определение в файле mobiledetect.php строка 214
|
staticprotected |
См. определение в файле mobiledetect.php строка 549
|
protected |
См. определение в файле mobiledetect.php строка 95
|
staticprotected |
См. определение в файле mobiledetect.php строка 528
| const DETECTION_TYPE_EXTENDED = 'extended' |
Extended detection type.
См. определение в файле mobiledetect.php строка 46
| const DETECTION_TYPE_MOBILE = 'mobile' |
Mobile detection type.
См. определение в файле mobiledetect.php строка 39
| const MOBILE_GRADE_A = 'A' |
Top-level device.
См. определение в файле mobiledetect.php строка 58
| const MOBILE_GRADE_B = 'B' |
Mid-level device.
См. определение в файле mobiledetect.php строка 63
| const MOBILE_GRADE_C = 'C' |
Low-level device.
См. определение в файле mobiledetect.php строка 68
| const VER = '([\w._\+]+)' |
A frequently used regular expression to extract version #s.
См. определение в файле mobiledetect.php строка 53
| const VERSION = '2.8.13' |
Stores the version number of the current release.
См. определение в файле mobiledetect.php строка 73
| const VERSION_TYPE_FLOAT = 'float' |
A type for the version() method indicating a float return value.
См. определение в файле mobiledetect.php строка 83
| const VERSION_TYPE_STRING = 'text' |
A type for the version() method indicating a string return value.
См. определение в файле mobiledetect.php строка 78