Example #1
0
 function onAppStart($applicationParams = array())
 {
     //echo md5(strtolower($_SERVER["REQUEST_URI"]));
     if (APP_USE_SESSIONS) {
         import('persistence.Session');
         $this->flash = Session::get("flashdata");
         $this->flashtype = Session::get("flashtype");
         Session::clearFlash();
         Session::start();
     }
     if (APP_USE_CART) {
         import('data.Cart');
         $this->_shoppingCart = new Cart(APP_CART_NAME, APP_CART_OVERWRITE);
     }
     if (APP_USE_TEMPLATES) {
         import('view.View');
         $this->view = new View(APP_VIEWS_LOCATION . APP_BASE_TEMPLATE);
         //$this->view->set("language",$this->languageData);
         $this->view->set("app_action", $applicationParams);
     }
     $this->controller = array_shift($applicationParams);
     $this->method = array_shift($applicationParams);
     $this->params = $applicationParams;
 }
Example #2
0
 /**
  *
  */
 protected function rendarParamSet()
 {
     // set template
     $this->template->assign_vars(array("PATH" => Application::getBaseUrl(), "PPATH" => Application::getBaseUrl("/" . $this->project), "ROOT" => Application::getWebUrl(), "PROOT" => Application::getWebUrl("/" . $this->project), "HOST" => Application::getHostname(), "URL" => Application::getHostUrl(), "PROJECT_NAME" => $this->project, "CLASS_NAME" => get_class($this), "SELF" => Application::getBaseUrl() . Request::getUri(), "SERVER" => Request::getServer()->getVars(), "REQUEST" => Request::getRequest()->getVars(), "POST" => Request::post()->getVars(), "GET" => Request::getQuery()->getVars(), "FLASH" => Session::getFlashData()));
     Session::clearFlash();
 }