class Illuminate / View / FileViewFinder
You are viewing an older version of the documentation. For the latest, please visit master documentation.

FileViewFinder

Implements

Properties

protected

$files Filesystem

The filesystem instance.

Default: null
protected

$paths array

The array of active view paths.

Default: null
protected

$views array

The array of views that have been located.

Default: []
protected

$hints array

The namespace to file path hints.

Default: []
protected

$extensions string[]

Register a view extension with the finder.

Default: array

Methods

public

__construct ( Filesystem $files , array $paths , array $extensions ) : void

Create a new file view loader instance.

Parameters

  • $files Filesystem
  • $paths array
  • $extensions array|null
public

find ( $name ) : string

Get the fully qualified location of the view.

Parameters

  • $name string
protected

findNamespacedView ( $name ) : string

Get the path to a template with a named path.

Parameters

  • $name string
protected

parseNamespaceSegments ( $name ) : array

Get the segments of a template with a named path.

Parameters

  • $name string
protected

findInPaths ( $name , $paths ) : string

Find the given view in the list of paths.

Parameters

  • $name string
  • $paths array
protected

getPossibleViewFiles ( $name ) : array

Get an array of possible view files.

Parameters

  • $name string
public

addLocation ( $location ) : void

Add a location to the finder.

Parameters

  • $location string
public

prependLocation ( $location ) : void

Prepend a location to the finder.

Parameters

  • $location string
protected

resolvePath ( $path ) : string

Resolve the path.

Parameters

  • $path string
public

addNamespace ( $namespace , $hints ) : void

Add a namespace hint to the finder.

Parameters

  • $namespace string
  • $hints string|array
public

prependNamespace ( $namespace , $hints ) : void

Prepend a namespace hint to the finder.

Parameters

  • $namespace string
  • $hints string|array
public

replaceNamespace ( $namespace , $hints ) : void

Replace the namespace hints for the given namespace.

Parameters

  • $namespace string
  • $hints string|array
public

addExtension ( $extension ) : void

Register an extension with the view finder.

Parameters

  • $extension string
public

hasHintInformation ( $name ) : bool

Returns whether or not the view name has any hint information.

Parameters

  • $name string
public

flush ( ) : void

Flush the cache of located views.

public

getFilesystem ( ) : Filesystem

Get the filesystem instance.

public

setPaths ( $paths ) : $this

Set the active view paths.

Parameters

  • $paths array
public

getPaths ( ) : array

Get the active view paths.

public

getViews ( ) : array

Get the views that have been located.

public

getHints ( ) : array

Get the namespace to file path hints.

public

getExtensions ( ) : array

Get registered extensions.