2
0

Device.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Http
  17. * @subpackage UserAgent
  18. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * Interface defining a browser device type.
  23. *
  24. * @category Zend
  25. * @package Zend_Http
  26. * @subpackage UserAgent
  27. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. */
  30. interface Zend_Http_UserAgent_Device extends Serializable
  31. {
  32. /**
  33. * Constructor
  34. *
  35. * Allows injecting user agent, server array, and/or config array. If an
  36. * array is provided for the first argument, the assumption should be that
  37. * the device object is being seeded with cached values from serialization.
  38. *
  39. * @param null|string|array $userAgent
  40. * @param array $server
  41. * @param array $config
  42. * @return void
  43. */
  44. public function __construct($userAgent = null, array $server = array(), array $config = array());
  45. /**
  46. * Attempt to match the user agent
  47. *
  48. * Return either an array of browser signature strings, or a boolean.
  49. *
  50. * @param string $userAgent
  51. * @param array $server
  52. * @return bool|array
  53. */
  54. public static function match($userAgent, $server);
  55. /**
  56. * Get all browser/device features
  57. *
  58. * @return array
  59. */
  60. public function getAllFeatures();
  61. /**
  62. * Get all of the browser/device's features' groups
  63. *
  64. * @return void
  65. */
  66. public function getAllGroups();
  67. /**
  68. * Get the browser type
  69. *
  70. * @return string
  71. */
  72. public function getBrowser();
  73. /**
  74. * Retrurn the browser version
  75. *
  76. * @return string
  77. */
  78. public function getBrowserVersion();
  79. /**
  80. * Get an array of features associated with a group
  81. *
  82. * @param string $group
  83. * @return array
  84. */
  85. public function getGroup($group);
  86. /**
  87. * Retrieve image format support
  88. *
  89. * @return array
  90. */
  91. public function getImageFormatSupport();
  92. /**
  93. * Get image types
  94. *
  95. * @return array
  96. */
  97. public function getImages();
  98. /**
  99. * Get the maximum image height supported by this device
  100. *
  101. * @return int
  102. */
  103. public function getMaxImageHeight();
  104. /**
  105. * Get the maximum image width supported by this device
  106. *
  107. * @return int
  108. */
  109. public function getMaxImageWidth();
  110. /**
  111. * Get the physical screen height of this device
  112. *
  113. * @return int
  114. */
  115. public function getPhysicalScreenHeight();
  116. /**
  117. * Get the physical screen width of this device
  118. *
  119. * @return int
  120. */
  121. public function getPhysicalScreenWidth();
  122. /**
  123. * Get the preferred markup type
  124. *
  125. * @return string
  126. */
  127. public function getPreferredMarkup();
  128. /**
  129. * Get the user agent string
  130. *
  131. * @return string
  132. */
  133. public function getUserAgent();
  134. /**
  135. * Get supported X/HTML version
  136. *
  137. * @return int
  138. */
  139. public function getXhtmlSupportLevel();
  140. /**
  141. * Does the device support Flash?
  142. *
  143. * @return bool
  144. */
  145. public function hasFlashSupport();
  146. /**
  147. * Does the device support PDF?
  148. *
  149. * @return bool
  150. */
  151. public function hasPdfSupport();
  152. /**
  153. * Does the device have a phone number associated with it?
  154. *
  155. * @return bool
  156. */
  157. public function hasPhoneNumber();
  158. /**
  159. * Does the device support HTTPS?
  160. *
  161. * @return bool
  162. */
  163. public function httpsSupport();
  164. }