Пример #1
0
 /**
  * Get the Browser Array from private var or fetch it from cache or XML
  * @access public
  * @return array
  */
 public static function getOsArray()
 {
     if (!is_null(self::$_osList)) {
         return self::$_osList;
     }
     $registry = Zend_Registry::getInstance();
     $cacheKey = 'os_xml';
     $value = Dot_Cache::load($cacheKey);
     if (false != $value) {
         $os = $value;
     } else {
         $xml = new Zend_Config_Xml(CONFIGURATION_PATH . '/useragent/os.xml');
         $os = $xml->type->toArray();
         self::$_osList = $os;
         Dot_Cache::save($os, $cacheKey);
     }
     return $os;
 }