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(); } }
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}"); }
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); }
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(); } }