FileViewFinder
class FileViewFinder implements ViewFinderInterface
Properties
protected Filesystem | $files | The filesystem instance. |
|
protected array | $paths | The array of active view paths. |
|
protected array | $views | The array of views that have been located. |
|
protected array | $hints | The namespace to file path hints. |
|
protected array | $extensions | Register a view extension with the finder. |
Methods
Create a new file view loader instance.
Get the fully qualified location of the view.
Get the path to a template with a named path.
Get the segments of a template with a named path.
Find the given view in the list of paths.
Get an array of possible view files.
Add a location to the finder.
Prepend a location to the finder.
Add a namespace hint to the finder.
Prepend a namespace hint to the finder.
Replace the namespace hints for the given namespace.
Register an extension with the view finder.
Returns whether or not the view name has any hint information.
Flush the cache of located views.
Get the filesystem instance.
Get the active view paths.
Get the namespace to file path hints.
Get registered extensions.
Details
at line 53
void
__construct(Filesystem $files, array $paths, array $extensions = null)
Create a new file view loader instance.
at line 69
string
find(string $name)
Get the fully qualified location of the view.
at line 88
protected string
findNamespacedView(string $name)
Get the path to a template with a named path.
at line 103
protected array
parseNamespaceSegments(string $name)
Get the segments of a template with a named path.
at line 127
protected string
findInPaths(string $name, array $paths)
Find the given view in the list of paths.
at line 146
protected array
getPossibleViewFiles(string $name)
Get an array of possible view files.
at line 159
void
addLocation(string $location)
Add a location to the finder.
at line 170
void
prependLocation(string $location)
Prepend a location to the finder.
at line 182
void
addNamespace(string $namespace, string|array $hints)
Add a namespace hint to the finder.
at line 200
void
prependNamespace(string $namespace, string|array $hints)
Prepend a namespace hint to the finder.
at line 218
$this
replaceNamespace(string $namespace, string|array $hints)
Replace the namespace hints for the given namespace.
at line 229
void
addExtension(string $extension)
Register an extension with the view finder.
at line 244
bool
hasHintInformation(string $name)
Returns whether or not the view name has any hint information.
at line 254
void
flush()
Flush the cache of located views.
at line 264
Filesystem
getFilesystem()
Get the filesystem instance.
at line 274
array
getPaths()
Get the active view paths.
at line 284
array
getHints()
Get the namespace to file path hints.
at line 294
array
getExtensions()
Get registered extensions.