updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions
+38 -4
View File
@@ -47,13 +47,13 @@ class FileViewFinder implements ViewFinderInterface
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param array $paths
* @param array $extensions
* @param array|null $extensions
* @return void
*/
public function __construct(Filesystem $files, array $paths, array $extensions = null)
{
$this->files = $files;
$this->paths = $paths;
$this->paths = array_map([$this, 'resolvePath'], $paths);
if (isset($extensions)) {
$this->extensions = $extensions;
@@ -158,7 +158,7 @@ class FileViewFinder implements ViewFinderInterface
*/
public function addLocation($location)
{
$this->paths[] = $location;
$this->paths[] = $this->resolvePath($location);
}
/**
@@ -169,7 +169,18 @@ class FileViewFinder implements ViewFinderInterface
*/
public function prependLocation($location)
{
array_unshift($this->paths, $location);
array_unshift($this->paths, $this->resolvePath($location));
}
/**
* Resolve the path.
*
* @param string $path
* @return string
*/
protected function resolvePath($path)
{
return realpath($path) ?: $path;
}
/**
@@ -266,6 +277,19 @@ class FileViewFinder implements ViewFinderInterface
return $this->files;
}
/**
* Set the active view paths.
*
* @param array $paths
* @return $this
*/
public function setPaths($paths)
{
$this->paths = $paths;
return $this;
}
/**
* Get the active view paths.
*
@@ -276,6 +300,16 @@ class FileViewFinder implements ViewFinderInterface
return $this->paths;
}
/**
* Get the views that have been located.
*
* @return array
*/
public function getViews()
{
return $this->views;
}
/**
* Get the namespace to file path hints.
*