本文整理匯總了PHP中module::GetPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP module::GetPath方法的具體用法?PHP module::GetPath怎麽用?PHP module::GetPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module
的用法示例。
在下文中一共展示了module::GetPath方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
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: __construct
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: SetViewName
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: __construct
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();
}
}