本文整理汇总了PHP中Filesystem::FileExistsInIncludePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::FileExistsInIncludePath方法的具体用法?PHP Filesystem::FileExistsInIncludePath怎么用?PHP Filesystem::FileExistsInIncludePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filesystem
的用法示例。
在下文中一共展示了Filesystem::FileExistsInIncludePath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetTemplate
function SetTemplate($name)
{
// Make sure requested template exists
$requestedTemplate = 'templates/' . $name . '.php';
if (Filesystem::FileExistsInIncludePath($requestedTemplate)) {
$this->templateFile = $requestedTemplate;
} else {
return false;
}
}
示例2: SetLayout
function SetLayout($name)
{
// Make sure requested layout exists
$requestedLayout = 'layouts/' . $name . '.php';
if (Filesystem::FileExistsInIncludePath($requestedLayout)) {
$this->templateFile = $requestedLayout;
} else {
return false;
}
}
示例3: GetNewModule
function GetNewModule($name, $item = '', $hasParent = false)
{
global $_JAM;
if (!$_JAM->availableModules[$name]) {
trigger_error("Couldn't create new module because '" . $name . "' module does not exist", E_USER_ERROR);
}
$className = ucfirst($name) . 'Module';
$classPath = 'modules/' . $name . '/' . $className . '.php';
if (Filesystem::FileExistsInIncludePath($classPath)) {
// There is a custom module class; load it and create new instance
require_once $classPath;
$module = new $className($name, $item);
} else {
// There is no custom module class; use plain Module class
$module = new Module($name, $item);
}
// Don't run FinishSetup() if module has parent; will run later in NestModule
// FIXME: Kludgy.
if (!$hasParent) {
$module->FinishSetup();
}
return $module;
}