本文整理汇总了PHP中Solar_File::_file方法的典型用法代码示例。如果您正苦于以下问题:PHP Solar_File::_file方法的具体用法?PHP Solar_File::_file怎么用?PHP Solar_File::_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solar_File
的用法示例。
在下文中一共展示了Solar_File::_file方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
*
* Uses [[php::include() | ]] to run a script in a limited scope.
*
* @param string $file The file to include.
*
* @return mixed The return value of the included file.
*
*/
public static function load($file)
{
Solar_File::$_file = Solar_File::exists($file);
if (!Solar_File::$_file) {
// could not open the file for reading
$code = 'ERR_FILE_NOT_READABLE';
$text = Solar_Registry::get('locale')->fetch('Solar', $code);
throw Solar::exception('Solar', $code, $text, array('file' => $file));
}
// clean up the local scope, then include the file and
// return its results.
unset($file);
return include Solar_File::$_file;
}