protected function setupApplication($namespace, $title, array $javascripts = array(), array $css = array()) { Gecko_Model::setDefaultNamespace($namespace); $loader = Zend_Loader_Autoloader::getInstance(); $autoloaders = $loader->getAutoloaders(); foreach ($autoloaders as $loader) { $loader->addResourceType('row', 'models/Rows', 'Model_Row'); //$loader->addResourceType('service', 'services', 'Service'); } $this->bootstrap('view'); $View = $this->getResource('view'); $View->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); $View->addHelperPath(APPLICATION_PATH . '/views/helpers/', $namespace . '_View_Helper'); $View->addHelperPath('Gecko/View/Helper/', 'Gecko_View_Helper'); $View->doctype('HTML5'); $View->headTitle($title)->setSeparator(' > '); $View->headMeta()->appendName('Content-type', 'text/html; charset=utf-8')->appendName('viewport', 'width=device-width, initial-scale=1'); $View->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); $defaultCss = array('/css/normalize.css'); $css = array_merge($defaultCss, $css); foreach ($css as $cssPath) { $View->headLink()->appendStylesheet($cssPath); } $defaultJavascript = array(); $javascripts = array_merge($defaultJavascript, $javascripts); $View->jQuery()->setLocalPath('/js/jquery-1.11.1.min.js'); foreach ($javascripts as $jsPath) { $View->jQuery()->addJavascriptFile($jsPath); } }