interface Factory

Methods

bool
exists(string $view)

Determine if a given view exists.

file(string $path, Arrayable|array $data = [], array $mergeData = [])

Get the evaluated view contents for the given path.

make(string $view, Arrayable|array $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

first(array $views, Arrayable|array $data = [], array $mergeData = [])

Get the first view that actually exists from the given list.

mixed
share(array|string $key, mixed $value = null)

Add a piece of shared data to the environment.

array
composer(array|string $views, Closure|string $callback)

Register a view composer event.

array
creator(array|string $views, Closure|string $callback)

Register a view creator event.

addNamespace(string $namespace, string|array $hints)

Add a new namespace to the loader.

replaceNamespace(string $namespace, string|array $hints)

Replace the namespace hints for the given namespace.

void
flushFinderCache()

Flush the cache of located views.

Details

at line 15
bool exists(string $view)

Determine if a given view exists.

Parameters

string $view

Return Value

bool

at line 20
View file(string $path, Arrayable|array $data = [], array $mergeData = [])

Get the evaluated view contents for the given path.

Parameters

string $path
Arrayable|array $data
array $mergeData

Return Value

View

at line 25
View make(string $view, Arrayable|array $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

Parameters

string $view
Arrayable|array $data
array $mergeData

Return Value

View

at line 30
View first(array $views, Arrayable|array $data = [], array $mergeData = [])

Get the first view that actually exists from the given list.

Parameters

array $views
Arrayable|array $data
array $mergeData

Return Value

View

at line 35
mixed share(array|string $key, mixed $value = null)

Add a piece of shared data to the environment.

Parameters

array|string $key
mixed $value

Return Value

mixed

at line 40
array composer(array|string $views, Closure|string $callback)

Register a view composer event.

Parameters

array|string $views
Closure|string $callback

Return Value

array

at line 45
array creator(array|string $views, Closure|string $callback)

Register a view creator event.

Parameters

array|string $views
Closure|string $callback

Return Value

array

at line 50
Factory addNamespace(string $namespace, string|array $hints)

Add a new namespace to the loader.

Parameters

string $namespace
string|array $hints

Return Value

Factory

at line 55
Factory replaceNamespace(string $namespace, string|array $hints)

Replace the namespace hints for the given namespace.

Parameters

string $namespace
string|array $hints

Return Value

Factory

at line 60
void flushFinderCache()

Flush the cache of located views.

Return Value

void