예제 #1
0
파일: model.php 프로젝트: dariushha/zinux
 public function __construct($name, module $module, $auto_load = 1)
 {
     parent::__construct($name, $name);
     $this->relative_module = $module;
     $this->SetPath("{$this->relative_module->GetPath()}" . DIRECTORY_SEPARATOR . "models" . DIRECTORY_SEPARATOR . "{$this->full_name}{$this->extension}");
     if ($auto_load) {
         $this->Load();
     }
 }
예제 #2
0
 public function __construct($name, module $module)
 {
     if (preg_match('/(\\w+)controller$/i', $name)) {
         $name = preg_replace('/controller$/i', "", $name);
     }
     parent::__construct($name, "{$name}Controller");
     $this->relative_module = $module;
     $this->SetPath("{$this->relative_module->GetPath()}" . DIRECTORY_SEPARATOR . "controllers" . DIRECTORY_SEPARATOR . "{$this->full_name}{$this->extension}");
 }
예제 #3
0
파일: view.php 프로젝트: dariushha/zinux
 public function SetViewName($name)
 {
     if (preg_match('/(\\w+)view$/i', $name)) {
         $name = preg_replace('/view$/i', "", $name);
     }
     $this->name = $name;
     $this->full_name = "{$name}View";
     $this->SetPath("{$this->relative_module->GetPath()}" . DIRECTORY_SEPARATOR . "views" . DIRECTORY_SEPARATOR . "view" . DIRECTORY_SEPARATOR . "{$this->relative_controller->name}" . DIRECTORY_SEPARATOR . "{$this->full_name}{$this->extension}", 0);
 }
예제 #4
0
파일: helper.php 프로젝트: dariushha/zinux
 public function __construct($name, module $module, $auto_load = 1)
 {
     if (preg_match('/(\\w+)helper$/i', $name)) {
         $name = preg_replace('/helper$/i', "", $name);
     }
     parent::__construct($name, "{$name}Helper");
     $this->relative_module = $module;
     $this->SetPath("{$this->relative_module->GetPath()}" . DIRECTORY_SEPARATOR . "views" . DIRECTORY_SEPARATOR . "helper" . DIRECTORY_SEPARATOR . "{$this->full_name}{$this->extension}");
     if ($auto_load) {
         $this->Load();
     }
 }