本文整理汇总了PHP中Files::req方法的典型用法代码示例。如果您正苦于以下问题:PHP Files::req方法的具体用法?PHP Files::req怎么用?PHP Files::req使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Files
的用法示例。
在下文中一共展示了Files::req方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadUserFile
static function loadUserFile($file, $defaultLocation = '.', $globalize = null, $vars = null, $extract = null)
{
if ($file) {
$file = self::userFileLocation($file, $defaultLocation);
return Files::req($file, $globalize, $vars, $extract);
}
}
示例2: getTemplate
/**
@param template string path to template file relative to the templateFolder. .php is appended to this path.
@param vars variables to extract and make available to the template file
@return output from a template
*/
protected function getTemplate($template, $vars = null)
{
$vars['thisTemplate'] = $template;
$vars['control'] = $this->control;
$vars['view'] = $this;
//$this is reserved, can not use outside of object context
ob_start();
if (substr($template, -4) != '.php') {
$template = $template . '.php';
}
Files::req($_ENV['templateFolder'] . $template, null, $vars);
$output = ob_get_clean();
return $output;
}
示例3: req
static function req($path)
{
$file = \Config::userFileLocation($path, 'control') . '.php';
return \Files::req($file, array('control'));
}