namespace IlluminateView;
use InvalidArgumentException;
use IlluminateFilesystemFilesystem;
// about namespace
class FileViewFinder implements ViewFinderInterface
{// FileViewFinder implements ViewFinderInterface
protected $files;//The filesystem instance.
// The protected
protected $paths;//The array of active view paths
// set the view paths
protected $views = [];//The array of views that have been located
// array of views
protected $hints = [];//The namespace to file path hints/ just like notes
protected $extensions = ['blade.php', 'php'];// Register a view extension with the finder
// get the extension with the finder.
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
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
}



