public static function getFromRequest($request, array
$config) { if (!
class_exists('TeraWurfl'
)) { // If TeraWurfl class not found, see if we can load it from
// configuration
//
if (!
isset($config['terawurfl'
])) { // No configuration
throw new Zend_Http_UserAgent_Features_Exception('"TeraWurfl" configuration is not defined'
);
} $config =
$config['terawurfl'
];
if (empty($config['terawurfl_lib_dir'
])) { // No lib_dir given
throw new Zend_Http_UserAgent_Features_Exception('The "terawurfl_lib_dir" parameter is not defined'
);
} // Include the Tera-WURFL file
}