22 #require_once 'Zend/Http/UserAgent/AbstractDevice.php'; 154 'windows phone os 7',
278 public static function match($userAgent, $server)
281 if (isset($server[
'all_http'])) {
282 if (strpos(strtolower(str_replace(
' ',
'', $server[
'all_http'])),
'operam') !==
false) {
288 if (isset($server[
'http_x_wap_profile']) || isset($server[
'http_profile'])) {
292 if (isset($server[
'http_accept'])) {
293 if (self::_matchAgentAgainstSignatures($server[
'http_accept'], self::$_haTerms)) {
298 if (self::userAgentStart($userAgent)) {
302 if (self::_matchAgentAgainstSignatures($userAgent, self::$_uaSignatures)) {
318 $mobile_ua = strtolower(substr($userAgent, 0, 4));
320 return (in_array($mobile_ua, self::$_uaBegin));
331 if (empty(
$config[
'mobile'][
'features'])) {
335 parent::__construct($userAgent, $server,
$config);
355 $this->
setFeature(
'is_wireless_device',
false,
'product_info');
357 parent::_defineFeatures();
359 if (isset($this->_aFeatures[
"mobile_browser"])) {
360 $this->
setFeature(
"browser_name", $this->_aFeatures[
"mobile_browser"]);
361 $this->_browser = $this->_aFeatures[
"mobile_browser"];
363 if (isset($this->_aFeatures[
"mobile_browser_version"])) {
364 $this->
setFeature(
"browser_version", $this->_aFeatures[
"mobile_browser_version"]);
365 $this->_browserVersion = $this->_aFeatures[
"mobile_browser_version"];
369 if ($this->
getFeature(
'device_os') ==
'iPhone OS' 370 || $this->
getFeature(
'device_os_token') ==
'iPhone OS' 378 $this->_images = array();
381 $this->_images[] =
'png';
384 $this->_images[] =
'jpg';
387 $this->_images[] =
'gif';
390 $this->_images[] =
'wbmp';
405 switch ($preferredMarkup) {
410 case 'html_wi_imode_compact_generic':
411 case 'html_wi_imode_html_1':
412 case 'html_wi_imode_html_2':
413 case 'html_wi_imode_html_3':
414 case 'html_wi_imode_html_4':
415 case 'html_wi_imode_html_5':
417 case 'html_wi_oma_xhtmlmp_1_0':
418 case 'html_wi_w3_xhtmlbasic':
464 return $this->
getFeature(
'physical_screen_height');
474 return $this->
getFeature(
'physical_screen_width');
494 return $this->
getFeature(
'xhtml_support_level');
524 return $this->
getFeature(
'can_assign_phone_number');
534 return ($this->
getFeature(
'https_support') ==
'supported');
getMarkupLanguage($preferredMarkup=null)
static userAgentStart($userAgent)
static match($userAgent, $server)
__construct($userAgent=null, array $server=array(), array $config=array())
const DEFAULT_FEATURES_ADAPTER_PATH
getPhysicalScreenHeight()
const DEFAULT_FEATURES_ADAPTER_CLASSNAME
setFeature($feature, $value=false, $group='')