File indexing completed on 2024-12-22 05:36:47

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Http
0017  * @subpackage UserAgent
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  */
0021 
0022 /**
0023  * Interface defining a browser device type.
0024  *
0025  * @category   Zend
0026  * @package    Zend_Http
0027  * @subpackage UserAgent
0028  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0029  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0030  */
0031 interface Zend_Http_UserAgent_Device extends Serializable
0032 {
0033     /**
0034      * Constructor
0035      *
0036      * Allows injecting user agent, server array, and/or config array. If an
0037      * array is provided for the first argument, the assumption should be that
0038      * the device object is being seeded with cached values from serialization.
0039      *
0040      * @param  null|string|array $userAgent
0041      * @param  array $server
0042      * @param  array $config
0043      * @return void
0044      */
0045     public function __construct($userAgent = null, array $server = array(), array $config = array());
0046 
0047     /**
0048      * Attempt to match the user agent
0049      *
0050      * Return either an array of browser signature strings, or a boolean.
0051      *
0052      * @param  string $userAgent
0053      * @param  array $server
0054      * @return bool|array
0055      */
0056     public static function match($userAgent, $server);
0057 
0058     /**
0059      * Get all browser/device features
0060      *
0061      * @return array
0062      */
0063     public function getAllFeatures();
0064 
0065     /**
0066      * Get all of the browser/device's features' groups
0067      *
0068      * @return void
0069      */
0070     public function getAllGroups();
0071 
0072     /**
0073      * Whether or not the device has a given feature
0074      *
0075      * @param  string $feature
0076      * @return bool
0077      */
0078     public function hasFeature($feature);
0079 
0080     /**
0081      * Get the value of a specific device feature
0082      *
0083      * @param  string $feature
0084      * @return mixed
0085      */
0086     public function getFeature($feature);
0087 
0088     /**
0089      * Get the browser type
0090      *
0091      * @return string
0092      */
0093     public function getBrowser();
0094 
0095     /**
0096      * Retrurn the browser version
0097      *
0098      * @return string
0099      */
0100     public function getBrowserVersion();
0101 
0102     /**
0103      * Get an array of features associated with a group
0104      *
0105      * @param  string $group
0106      * @return array
0107      */
0108     public function getGroup($group);
0109 
0110     /**
0111      * Retrieve image format support
0112      *
0113      * @return array
0114      */
0115     public function getImageFormatSupport();
0116 
0117     /**
0118      * Get image types
0119      *
0120      * @return array
0121      */
0122     public function getImages();
0123 
0124     /**
0125      * Get the maximum image height supported by this device
0126      *
0127      * @return int
0128      */
0129     public function getMaxImageHeight();
0130 
0131     /**
0132      * Get the maximum image width supported by this device
0133      *
0134      * @return int
0135      */
0136     public function getMaxImageWidth();
0137 
0138     /**
0139      * Get the physical screen height of this device
0140      *
0141      * @return int
0142      */
0143     public function getPhysicalScreenHeight();
0144 
0145     /**
0146      * Get the physical screen width of this device
0147      *
0148      * @return int
0149      */
0150     public function getPhysicalScreenWidth();
0151 
0152     /**
0153      * Get the preferred markup type
0154      *
0155      * @return string
0156      */
0157     public function getPreferredMarkup();
0158 
0159     /**
0160      * Get the user agent string
0161      *
0162      * @return string
0163      */
0164     public function getUserAgent();
0165 
0166     /**
0167      * Get supported X/HTML version
0168      *
0169      * @return int
0170      */
0171     public function getXhtmlSupportLevel();
0172 
0173     /**
0174      * Does the device support Flash?
0175      *
0176      * @return bool
0177      */
0178     public function hasFlashSupport();
0179 
0180     /**
0181      * Does the device support PDF?
0182      *
0183      * @return bool
0184      */
0185     public function hasPdfSupport();
0186 
0187     /**
0188      * Does the device have a phone number associated with it?
0189      *
0190      * @return bool
0191      */
0192     public function hasPhoneNumber();
0193 
0194     /**
0195      * Does the device support HTTPS?
0196      *
0197      * @return bool
0198      */
0199     public function httpsSupport();
0200 }