Пример #1
0
 /**
  * Bootstraps session
  *
  * @param Uni_Application_Bootstrap $bootS
  * @return void
  */
 public static function initSession($bootS)
 {
     if (Fox::getMode() != Uni_Controller_Action::MODE_INSTALL) {
         session_set_cookie_params(0);
         if (!Fox::isDatabaseSession()) {
             Zend_Session::start(array('save_path' => APPLICATION_PATH . '/../var/sessions'));
         } else {
             $config = array('name' => Fox::getTableName('core_session'), 'primary' => 'id', 'modifiedColumn' => 'modified', 'dataColumn' => 'data', 'lifetimeColumn' => 'lifetime');
             Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
             Zend_Session::start();
         }
     }
 }
 /**
  * Sets template for rendering of view
  *
  * @param string $template 
  * @return void
  */
 public function setTemplate($template)
 {
     $package = Fox::getPreference(Fox::getMode() . '/design/package');
     $theme = Fox::getPreference(Fox::getMode() . '/design/theme');
     $sPath = $this->viewBase . $package . DS . $theme . DS . 'template';
     if (!file_exists($sPath . DS . $template . self::VIEW_SUFFIX)) {
         $sPath = $this->defaultScriptPath;
     }
     parent::setScriptPath($sPath);
     $this->template = $template;
 }