[李景山php]每天laravel-20161113|FileViewFinder-1.php
来源:互联网 发布:nba2kol鸟人安德森数据 编辑:程序博客网 时间:2024/06/06 00:31
namespace Illuminate\View;use InvalidArgumentException;use Illuminate\Filesystem\Filesystem;// about namespaceclass FileViewFinder implements ViewFinderInterface{// FileViewFinder implements ViewFinderInterface /** * The filesystem instance. * * @var \Illuminate\Filesystem\Filesystem */ protected $files;//The filesystem instance. // The protected /** * The array of active view paths. * * @var array */ protected $paths;//The array of active view paths // set the view paths /** * The array of views that have been located. * * @var array */ protected $views = [];//The array of views that have been located // array of views /** * The namespace to file path hints. * * @var array */ protected $hints = [];//The namespace to file path hints/ just like notes /** * Register a view extension with the finder. * * @var array */ protected $extensions = ['blade.php', 'php'];// Register a view extension with the finder // get the extension with the finder. /** * Create a new file view loader instance. * * @param \Illuminate\Filesystem\Filesystem $files * @param array $paths * @param array $extensions * @return void */ public function __construct(Filesystem $files, array $paths, array $extensions = null) {// something this construct is always loader instance. $this->files = $files;// set files $this->paths = $paths;// set path if (isset($extensions)) {//if have extensions $this->extensions = $extensions;// set the extensions } }// set the instance /** * Get the fully qualified location of the view. * * @param string $name * @return string */ public function find($name) {//Get the fully qualified location of the view. if (isset($this->views[$name])) { return $this->views[$name]; }// return it,just set this world if ($this->hasHintInformation($name = trim($name))) {// determine this hints return $this->views[$name] = $this->findNamedPathView($name);// set this path of view } return $this->views[$name] = $this->findInPaths($name, $this->paths);// default set this path }
0 0
- [李景山php]每天laravel-20161113|FileViewFinder-1.php
- [李景山php]每天laravel-20161114|FileViewFinder-2.php
- [李景山php]每天laravel-20161029|BladeCompiler-1.php
- [李景山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
- [李景山php]每天laravel-20160927|Factory.php
- [李景山php]每天laravel-20160928|PresenceVerifierInterface.php
- [李景山php]每天laravel-20160929|ValidatesWhenResolved.php
- [李景山php]每天laravel-20160930|ValidationException.php
- [李景山php]每天laravel-20161001|ValidationServiceProvider.php
- [李景山php]每天laravel-20161016|JsonResponse.php
- [李景山php]每天laravel-20161017|ResponseTrait.php
- [李景山php]每天laravel-20161017|UploadedFile.php
- [李景山php]每天laravel-20161023|Reponse.php
- [李景山php]每天laravel-20161024|ArrayLoader.php
- 到底什么才属于好地段
- Android中的ANR详解(原因和方案)
- UIButton高光状态(highlighted)时阴影效果
- java基础之33三大特性之多态
- 数组做函数参数的退化问题
- [李景山php]每天laravel-20161113|FileViewFinder-1.php
- 【Android】 开发干货-技术分享高仿QQToast实现
- HTTP报文
- 【C#】Entity Framework 增删改查和事务操作
- C语言实现顺序表的基本操作
- 站在面试官的高度去想问题
- 1058. 选择题(20)-PAT乙级真题
- MySQL查看和修改表的存储引擎
- 【zzulioj 1837 LT说我不服 + dp】