public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     /*CONFIG VARS*/
     $server = explode(".", $_SERVER['HTTP_HOST']);
     $c = count($server);
     @($SERVER = $server[$c - 2] . "." . $server[$c - 1]);
     try {
         $config = new Zend_Config_Ini('config.ini', $_SERVER['HTTP_HOST']);
         $this->_server = $_SERVER['HTTP_HOST'];
     } catch (Exception $e) {
         $config = new Zend_Config_Ini('config.ini', $SERVER);
         $this->_server = $SERVER;
     }
     /*    
         if (!empty($configCheck)) {//if there is a config value in config, use that one
             $config = new Zend_Config_Ini('quickstart.ini',  $_SERVER['HTTP_HOST'] );
             $this->_server =  $_SERVER['HTTP_HOST'];    
         }
     */
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $this->_host = $request->getScheme() . '://' . $config->paths->host;
     self::$host = $request->getScheme() . '://' . $config->paths->host;
     $this->_hostRW = $request->getScheme() . '://' . $config->paths->hostRW;
     self::$hostRW = $request->getScheme() . '://' . $config->paths->hostRW;
     $this->_nps = $config->paths->nps;
     self::$nps = $config->paths->nps;
     $this->_np = $config->paths->np;
     self::$np = $config->paths->np;
     $this->_adminUrl = $config->adminUrl;
     self::$adminUrl = $config->adminUrl;
     $this->setRequest($request)->setResponse($response)->_setInvokeArgs($invokeArgs);
     $this->_helper = new Zend_Controller_Action_HelperBroker($this);
     // This cache doesn't expire, needs to be cleaned manually.
     $frontendOptions = array('caching' => true, 'lifetime' => null, 'ignore_user_abort' => true, 'automatic_serialization' => true);
     $backendOptions = array('cache_dir' => $this->_nps . 'cacheAll/');
     $this->_cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
     Zend_Registry::set('cacheSt', $this->_cache);
     // This cache doesn't expire, needs to be cleaned manually.
     $frontendOptions = array('caching' => true, 'lifetime' => null, 'ignore_user_abort' => true, 'automatic_serialization' => true);
     $backendOptions = array('cache_dir' => $this->_nps . 'cache/');
     $this->_cachedPages = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
     Zend_Registry::set('cachedPages', $this->_cachedPages);
     //SESSION
     $this->_sesija = new Zend_Session_Namespace('net');
     $defaultLanguage = self::getDefaultLanguage();
     if ($this->_sesija->lang == null) {
         $this->_sesija->lang = $defaultLanguage;
     }
     //$this->_sesija->langAdmin = "en";
     Zend_Registry::set('currentUser', $this->_sesija->user);
     Zend_Registry::set('langCode', $this->_sesija->lang);
     self::setSettings();
     //this was earlier in the bootstrap - is it better here?
     //ACL
     if ($this->_sesija->currentRole == "") {
         $this->_sesija->currentRole = "guest";
     }
     Zend_Registry::set('currentRole', $this->_sesija->currentRole);
     $acl = $this->getAcl();
     Zend_Registry::set('acl', $acl);
     //ACL end
     //TRANSLATOR
     $reqValues = $this->_request->getParams();
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $this->_reqParams = $this->getRequest()->getRequestUri();
     //print_r($this->_reqParams);
     if ($reqValues['controller'] != "creator" && $reqValues['action'] != "admin") {
         //in creator only english - so far
         if (file_exists($this->_np . "languages/" . $this->_sesija->lang . ".php")) {
             $this->_translate = new Zend_Translate('array', $this->_np . 'languages/' . $this->_sesija->lang . '.php', $this->_sesija->lang);
             Zend_Registry::set('Zend_Translate', $this->_translate);
             $this->translator = $this->_translate;
         }
     } else {
         $creatorLanguage = "sr";
         $creatorLanguage = $this->_sesija->creatorLang;
         if (file_exists($this->_np . "languages/creator/" . $creatorLanguage . ".php")) {
             $this->_translate = new Zend_Translate('array', $this->_np . 'languages/creator/' . $creatorLanguage . '.php', $creatorLanguage);
             Zend_Registry::set('Zend_Translate', $this->_translate);
             $this->translator = $this->_translate;
         }
     }
     $creatorLanguage = "sr";
     $creatorLanguage = $this->_sesija->creatorLang;
     if (file_exists($this->_np . "languages/creator/" . $creatorLanguage . ".php")) {
         $this->_translateCreator = new Zend_Translate('array', $this->_np . 'languages/creator/' . $creatorLanguage . '.php', $creatorLanguage);
         Zend_Registry::set('Zend_Translate_Creator', $this->_translateCreator);
     }
     //BASE URL
     $this->_baseUrl = $this->_request->getRequestUri();
     //$this->_sesija->_urlCurrent = $this->_baseUrl;
     //$this->_sesija->bcumbs = array();
     if (!empty($this->_sesija->bcumbs)) {
         $should = 1;
         foreach ($this->_sesija->bcumbs as $bcumb) {
             if (in_array($this->_baseUrl, $bcumb)) {
                 $should = 0;
                 break;
             } else {
                 $should = 1;
             }
         }
         if (strpos($this->_baseUrl, "font.swf") === FALSE && strpos($this->_baseUrl, "lang") === FALSE && $should == 1 && $reqValues['controller'] != "creator") {
             $this->_sesija->bcumbs[$this->_sesija->_i]['url'] = $this->_baseUrl;
             $this->_sesija->bcumbs[$this->_sesija->_i]['title'] = $this->_title . "CCC";
             $this->_sesija->_i++;
         }
         //$this->_sesija->bcumbs[$this->_baseUrl]['url']['title'] = $this->_title . "CCC";
     }
     //AJAX
     $request = $this->getRequest();
     if ($request->isXmlHttpRequest()) {
         $this->_helper->layout()->disableLayout();
     }
     $this->_db = Zend_Registry::get('db');
     $this->_getDefaultTemplate();
     $this->init();
 }