diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Application/Resource/Useragent.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Application/Resource/Useragent.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,72 @@ +getUserAgent(); + + // Optionally seed the UserAgent view helper + $bootstrap = $this->getBootstrap(); + if ($bootstrap->hasResource('view') || $bootstrap->hasPluginResource('view')) { + $bootstrap->bootstrap('view'); + $view = $bootstrap->getResource('view'); + if (null !== $view) { + $view->userAgent($userAgent); + } + } + + return $userAgent; + } + + /** + * Get UserAgent instance + * + * @return Zend_Http_UserAgent + */ + public function getUserAgent() + { + if (null === $this->_userAgent) { + $options = $this->getOptions(); + $this->_userAgent = new Zend_Http_UserAgent($options); + } + + return $this->_userAgent; + } +}