Example #1
0
 /**
  * Perform match by device type.
  *
  * @return Tx_ContextsWurfl_Context_Type_Wurfl
  */
 protected function matchDeviceType()
 {
     // Match mobile device
     if ($this->getConfValue('settings.isMobile', false)) {
         $this->match |= $this->wurfl->isMobile();
     } else {
         // Match wireless device
         if ($this->getConfValue('settings.isWireless', false)) {
             $this->match |= $this->wurfl->isWireless();
         }
         // Match tablet
         if ($this->getConfValue('settings.isTablet', false)) {
             $this->match |= $this->wurfl->isTablet();
         }
         // Match phone
         if ($this->getConfValue('settings.isPhone', false)) {
             $this->match |= $this->wurfl->isPhone();
         }
     }
     // Match smart tv
     if ($this->getConfValue('settings.isSmartTv', false)) {
         $this->match |= $this->wurfl->isSmartTv();
     }
     return $this;
 }