FileViewFinder
in package
implements
ViewFinderInterface
Interfaces, Classes and Traits
Table of Contents
- $extensions : array<string|int, mixed>
- Register a view extension with the finder.
- $files : Filesystem
- The filesystem instance.
- $hints : array<string|int, mixed>
- The namespace to file path hints.
- $paths : array<string|int, mixed>
- The array of active view paths.
- $views : array<string|int, mixed>
- The array of views that have been located.
- __construct() : void
- Create a new file view loader instance.
- addExtension() : void
- Register an extension with the view finder.
- addLocation() : void
- Add a location to the finder.
- addNamespace() : void
- Add a namespace hint to the finder.
- find() : string
- Get the fully qualified location of the view.
- flush() : void
- Flush the cache of located views.
- getExtensions() : array<string|int, mixed>
- Get registered extensions.
- getFilesystem() : Filesystem
- Get the filesystem instance.
- getHints() : array<string|int, mixed>
- Get the namespace to file path hints.
- getPaths() : array<string|int, mixed>
- Get the active view paths.
- hasHintInformation() : bool
- Returns whether or not the view name has any hint information.
- prependLocation() : void
- Prepend a location to the finder.
- prependNamespace() : void
- Prepend a namespace hint to the finder.
- replaceNamespace() : void
- Replace the namespace hints for the given namespace.
- findInPaths() : string
- Find the given view in the list of paths.
- findNamespacedView() : string
- Get the path to a template with a named path.
- getPossibleViewFiles() : array<string|int, mixed>
- Get an array of possible view files.
- parseNamespaceSegments() : array<string|int, mixed>
- Get the segments of a template with a named path.
Properties
$extensions
Register a view extension with the finder.
protected
array<string|int, mixed>
$extensions
= ['blade.php', 'php', 'css']
$files
The filesystem instance.
protected
Filesystem
$files
$hints
The namespace to file path hints.
protected
array<string|int, mixed>
$hints
= []
$paths
The array of active view paths.
protected
array<string|int, mixed>
$paths
$views
The array of views that have been located.
protected
array<string|int, mixed>
$views
= []
Methods
__construct()
Create a new file view loader instance.
public
__construct(Filesystem $files, array<string|int, mixed> $paths[, array<string|int, mixed> $extensions = null ]) : void
Parameters
- $files : Filesystem
- $paths : array<string|int, mixed>
- $extensions : array<string|int, mixed> = null
Return values
void —addExtension()
Register an extension with the view finder.
public
addExtension(string $extension) : void
Parameters
- $extension : string
Return values
void —addLocation()
Add a location to the finder.
public
addLocation(string $location) : void
Parameters
- $location : string
Return values
void —addNamespace()
Add a namespace hint to the finder.
public
addNamespace(string $namespace, string|array<string|int, mixed> $hints) : void
Parameters
- $namespace : string
- $hints : string|array<string|int, mixed>
Return values
void —find()
Get the fully qualified location of the view.
public
find(string $name) : string
Parameters
- $name : string
Return values
string —flush()
Flush the cache of located views.
public
flush() : void
Return values
void —getExtensions()
Get registered extensions.
public
getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFilesystem()
Get the filesystem instance.
public
getFilesystem() : Filesystem
Return values
Filesystem —getHints()
Get the namespace to file path hints.
public
getHints() : array<string|int, mixed>
Return values
array<string|int, mixed> —getPaths()
Get the active view paths.
public
getPaths() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasHintInformation()
Returns whether or not the view name has any hint information.
public
hasHintInformation(string $name) : bool
Parameters
- $name : string
Return values
bool —prependLocation()
Prepend a location to the finder.
public
prependLocation(string $location) : void
Parameters
- $location : string
Return values
void —prependNamespace()
Prepend a namespace hint to the finder.
public
prependNamespace(string $namespace, string|array<string|int, mixed> $hints) : void
Parameters
- $namespace : string
- $hints : string|array<string|int, mixed>
Return values
void —replaceNamespace()
Replace the namespace hints for the given namespace.
public
replaceNamespace(string $namespace, string|array<string|int, mixed> $hints) : void
Parameters
- $namespace : string
- $hints : string|array<string|int, mixed>
Return values
void —findInPaths()
Find the given view in the list of paths.
protected
findInPaths(string $name, array<string|int, mixed> $paths) : string
Parameters
- $name : string
- $paths : array<string|int, mixed>
Tags
Return values
string —findNamespacedView()
Get the path to a template with a named path.
protected
findNamespacedView(string $name) : string
Parameters
- $name : string
Return values
string —getPossibleViewFiles()
Get an array of possible view files.
protected
getPossibleViewFiles(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —parseNamespaceSegments()
Get the segments of a template with a named path.
protected
parseNamespaceSegments(string $name) : array<string|int, mixed>
Parameters
- $name : string