本文整理汇总了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();
}
}