Example #1
0
 /**
  * create the path/to/folder for diferante view
  * @return void 
  */
 public function makePath()
 {
     $this->layoutPath = Config::layoutDir() . DS . $this->layout . '.ctp';
     if (!file_exists($this->layoutPath)) {
         throw new \Exception("the layout file : {$this->layoutPath} does not exist", 601);
     }
     $viewFolder = strtolower(str_replace('Controller', '', $this->request->controller));
     $this->viewPath = Config::viewDir() . DS . $viewFolder . DS . $this->request->action . '.ctp';
     if (!file_exists($this->viewPath)) {
         throw new \Exception("the view file : {$this->viewPath} does not exist", 601);
     }
 }