equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Http |
16 * @package Zend_Http |
17 * @subpackage UserAgent |
17 * @subpackage UserAgent |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 */ |
20 */ |
21 |
21 |
22 require_once 'Zend/Http/UserAgent/AbstractDevice.php'; |
22 require_once 'Zend/Http/UserAgent/AbstractDevice.php'; |
23 |
23 |
25 * Probe browser type matcher |
25 * Probe browser type matcher |
26 * |
26 * |
27 * @category Zend |
27 * @category Zend |
28 * @package Zend_Http |
28 * @package Zend_Http |
29 * @subpackage UserAgent |
29 * @subpackage UserAgent |
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
30 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 */ |
32 */ |
33 class Zend_Http_UserAgent_Probe extends Zend_Http_UserAgent_AbstractDevice |
33 class Zend_Http_UserAgent_Probe extends Zend_Http_UserAgent_AbstractDevice |
34 { |
34 { |
35 /** |
35 /** |
36 * User Agent Signatures |
36 * User Agent Signatures |
37 * |
37 * |
38 * @var array |
38 * @var array |
39 */ |
39 */ |
40 protected static $_uaSignatures = array( |
40 protected static $_uaSignatures = array( |
41 'witbe', |
41 'witbe', |
42 'netvigie', |
42 'netvigie', |
43 ); |
43 ); |
44 |
44 |
45 /** |
45 /** |
46 * Comparison of the UserAgent chain and User Agent signatures |
46 * Comparison of the UserAgent chain and User Agent signatures |
47 * |
47 * |
48 * @param string $userAgent User Agent chain |
48 * @param string $userAgent User Agent chain |
49 * @param array $server $_SERVER like param |
49 * @param array $server $_SERVER like param |
52 public static function match($userAgent, $server) |
52 public static function match($userAgent, $server) |
53 { |
53 { |
54 return self::_matchAgentAgainstSignatures($userAgent, self::$_uaSignatures); |
54 return self::_matchAgentAgainstSignatures($userAgent, self::$_uaSignatures); |
55 } |
55 } |
56 |
56 |
57 |
57 |
58 /** |
58 /** |
59 * Gives the current browser type |
59 * Gives the current browser type |
60 * |
60 * |
61 * @return string |
61 * @return string |
62 */ |
62 */ |