/** * Creates a new FileViewFinder, copying the current contents * * @param FileViewFinder $finder * @param array $paths * * @return FileViewFinder */ protected function createViewFinder(FileViewFinder $finder, array $paths = []) { $new = new FileViewFinder(app('files'), $paths, $finder->getExtensions()); foreach ($finder->getHints() as $namespace => $hints) { $new->addNamespace($namespace, $hints); } return $new; }
/** * Copy a FileViewFinder to a FallbackFileViewFinder * * @param \Illuminate\View\FileViewFinder $otherFinder * @return static **/ public static function fromOther(FileViewFinder $otherFinder) { $copy = new static($otherFinder->getFilesystem(), $otherFinder->getPaths(), $otherFinder->getExtensions()); if ($otherFinder instanceof FallbackFileViewFinder) { $copy->setFallbackDir($otherFinder->getFallbackDir()); } return $copy; }