FileViewFinder
Implements
Properties
$paths array
The array of active view paths.
$views array
The array of views that have been located.
$hints array
The namespace to file path hints.
$extensions string[]
Register a view extension with the finder.
Methods
__construct ( Filesystem $files , array $paths , array $extensions ) : void
Create a new file view loader instance.
Parameters
- $files Filesystem
- $paths array
- $extensions array|null
find ( $name ) : string
Get the fully qualified location of the view.
Parameters
- $name string
findNamespacedView ( $name ) : string
Get the path to a template with a named path.
Parameters
- $name string
parseNamespaceSegments ( $name ) : array
Get the segments of a template with a named path.
Parameters
- $name string
findInPaths ( $name , $paths ) : string
Find the given view in the list of paths.
Parameters
- $name string
- $paths array
getPossibleViewFiles ( $name ) : array
Get an array of possible view files.
Parameters
- $name string
addLocation ( $location ) : void
Add a location to the finder.
Parameters
- $location string
prependLocation ( $location ) : void
Prepend a location to the finder.
Parameters
- $location string
resolvePath ( $path ) : string
Resolve the path.
Parameters
- $path string
addNamespace ( $namespace , $hints ) : void
Add a namespace hint to the finder.
Parameters
- $namespace string
- $hints string|array
prependNamespace ( $namespace , $hints ) : void
Prepend a namespace hint to the finder.
Parameters
- $namespace string
- $hints string|array
replaceNamespace ( $namespace , $hints ) : void
Replace the namespace hints for the given namespace.
Parameters
- $namespace string
- $hints string|array
addExtension ( $extension ) : void
Register an extension with the view finder.
Parameters
- $extension string
hasHintInformation ( $name ) : bool
Returns whether or not the view name has any hint information.
Parameters
- $name string
flush ( ) : void
Flush the cache of located views.
setPaths ( $paths ) : $this
Set the active view paths.
Parameters
- $paths array
getPaths ( ) : array
Get the active view paths.
getViews ( ) : array
Get the views that have been located.
getHints ( ) : array
Get the namespace to file path hints.
getExtensions ( ) : array
Get registered extensions.