ViewFinderInterface.php
TLDR
This file is the interface for the ViewFinder
class. It defines methods and constants related to finding view files in the Laravel framework.
Methods
find($view)
This method is used to find the fully qualified location of a view. It takes a string parameter $view
and returns a string representing the location of the view.
addLocation($location)
This method is used to add a location to the view finder. It takes a string parameter $location
representing the location path and does not return anything.
addNamespace($namespace, $hints)
This method is used to add a namespace hint to the view finder. It takes a string parameter $namespace
representing the namespace and a string or array parameter $hints
representing the hints for the namespace. It does not return anything.
prependNamespace($namespace, $hints)
This method is used to prepend a namespace hint to the view finder. It takes a string parameter $namespace
representing the namespace and a string or array parameter $hints
representing the hints for the namespace. It does not return anything.
replaceNamespace($namespace, $hints)
This method is used to replace the namespace hints for a given namespace. It takes a string parameter $namespace
representing the namespace and a string or array parameter $hints
representing the new hints for the namespace. It does not return anything.
addExtension($extension)
This method is used to add a valid view extension to the view finder. It takes a string parameter $extension
representing the extension to be added and does not return anything.
flush()
This method is used to flush the cache of located views. It does not take any parameters or return anything.
<?php
namespace Illuminate\View;
interface ViewFinderInterface
{
/**
* Hint path delimiter value.
*
* @var string
*/
const HINT_PATH_DELIMITER = '::';
/**
* Get the fully qualified location of the view.
*
* @param string $view
* @return string
*/
public function find($view);
/**
* Add a location to the finder.
*
* @param string $location
* @return void
*/
public function addLocation($location);
/**
* Add a namespace hint to the finder.
*
* @param string $namespace
* @param string|array $hints
* @return void
*/
public function addNamespace($namespace, $hints);
/**
* Prepend a namespace hint to the finder.
*
* @param string $namespace
* @param string|array $hints
* @return void
*/
public function prependNamespace($namespace, $hints);
/**
* Replace the namespace hints for the given namespace.
*
* @param string $namespace
* @param string|array $hints
* @return void
*/
public function replaceNamespace($namespace, $hints);
/**
* Add a valid view extension to the finder.
*
* @param string $extension
* @return void
*/
public function addExtension($extension);
/**
* Flush the cache of located views.
*
* @return void
*/
public function flush();
}