[李景山php]每天laravel-20161102|CompileEngine.php-1
来源:互联网 发布:藏宝阁交易数据异常 编辑:程序博客网 时间:2024/05/01 19:51
namespace Illuminate\View\Engines;use Exception;use ErrorException;use Illuminate\View\Compilers\CompilerInterface;// namespaceclass CompilerEngine extends PhpEngine{// class CompilerEngine extends PhpEngine /** * The Blade compiler instance. * * @var \Illuminate\View\Compilers\CompilerInterface */ protected $compiler;// The Blade compiler instance /** * A stack of the last compiled templates. * * @var array */ protected $lastCompiled = [];// a stack of the last compiled templates /** * Create a new Blade view engine instance. * * @param \Illuminate\View\Compilers\CompilerInterface $compiler * @return void */ public function __construct(CompilerInterface $compiler) { $this->compiler = $compiler;// must be set or right }//Create a new blade view engine instance /** * Get the evaluated contents of the view. * * @param string $path * @param array $data * @return string */ public function get($path, array $data = []) {// evaluated contents of the view. $this->lastCompiled[] = $path;// this path be set // If this given view has expired, which means it has simply been edited since // it was last compiled, we will re-compile the views so we can evaluate a // fresh copy of the view. We'll pass the compiler the path of the view. if ($this->compiler->isExpired($path)) { $this->compiler->compile($path); }// If this given view has expired, which means it has simply been edited since // it was last compiled, we will re-compile the views so we can evaluate a // fresh copy of the view. we'll pass the compiler the path of the view. $compiled = $this->compiler->getCompiledPath($path);//get compiled Path // Once we have the path to the compiled file, we will evaluate the paths with // typical PHP just like any other templates. We also keep a stack of views // which have been rendered for right exception messages to be generated. $results = $this->evaluatePath($compiled, $data); // Once we have the path to the compiled file, we will evaluate the paths with // typical PHP just like any other templates. we also keep a stack of views //which have been rendered for right exception messages to be generated array_pop($this->lastCompiled); return $results; }// get the results.
0 0
- [李景山php]每天laravel-20161102|CompileEngine.php-1
- [李景山php]每天laravel-20160827|McryptEncrypter-1
- [李景山php]每天laravel-20160901|Dispatcher-1
- [李景山php]每天laravel-20160910|Filesystem-1
- [李景山php]每天laravel-20160914|FileSystemManager-1
- [李景山php]每天laravel-20160919|Writer-1
- [李景山php]每天laravel[036]-laravel 系统服务 --- 认证-1
- [李景山php]每天laravel[038]-laravel 系统服务 --- 授权-1
- [李景山php]每天laravel-20161001|Validator.php-1
- [李景山php]每天laravel-20161018|RedirectResponse.php-1
- [李景山php]每天laravel-20161020|Request.php-1
- [李景山php]每天laravel-20161117|ConnectionFatory.php-1
- [李景山php]每天laravel-20161129|BelongsToMany.php-1
- [李景山php]每天laravel-20160922|RedisServicProvider.php
- [李景山php]每天laravel-20160923|Hub.php
- [李景山php]每天laravel-20160924|PiplineServiceProvider.php
- [李景山php]每天laravel-20160925|Pipeline.php
- [李景山php]每天laravel-20160926|DatabasePresenceVerifier.php
- C - 数据结构之链表
- Zookeeper--Zookeeper是什么
- 平衡二叉树(AVLs)
- Flume官方文档翻译之(五)
- DBCP、C3P0、Proxool 、 BoneCP开源连接池的比较
- [李景山php]每天laravel-20161102|CompileEngine.php-1
- NoSQL定义及分类
- IE8 console未定义
- LeetCode292. Nim Game
- JSP图片验证码
- 图像处理理论(三)——双边滤波, Steerable滤波, Gabor滤波, Schmid滤波
- Mysql与其他数据库的简单比较
- UVA11292
- web dynpro配置注意事项