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 __construct($name, controller $controller) { if (preg_match('/(\\w+)action$/i', $name)) { $name = preg_replace('/action$/i', "", $name); } parent::__construct($name, "{$name}Action"); $this->relative_controller = $controller; $this->relative_module = $controller->relative_module; $this->SetPath($this->relative_controller->GetPath()); }
public function __construct($name, action $action) { if (preg_match('/(\\w+)view$/i', $name)) { $name = preg_replace('/view$/i', "", $name); } parent::__construct($name, "{$name}View"); $this->relative_action = $action; $this->relative_controller = $action->relative_controller; $this->relative_module = $action->relative_module; $this->extension = ".phtml"; $this->SetViewName($this->name); }
public function __construct($name, $path = "", $namespace_prefix = "modules") { if (preg_match('/(\\w+)module$/i', $name)) { $name = preg_replace('/module$/i', "", $name); } if (!\strlen($path)) { $path = MODULE_ROOT . "{$name}Module"; } parent::__construct($name, "{$name}Module"); $this->SetPath($path); $this->namespace_prex = $namespace_prefix; }
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(); } }