Documentation

Factory

Table of Contents

addNamespace()  : $this
Add a new namespace to the loader.
composer()  : array<string|int, mixed>
Register a view composer event.
creator()  : array<string|int, mixed>
Register a view creator event.
exists()  : bool
Determine if a given view exists.
file()  : View
Get the evaluated view contents for the given path.
make()  : View
Get the evaluated view contents for the given view.
replaceNamespace()  : $this
Replace the namespace hints for the given namespace.
share()  : mixed
Add a piece of shared data to the environment.

Methods

addNamespace()

Add a new namespace to the loader.

public addNamespace(string $namespace, string|array<string|int, mixed> $hints) : $this
Parameters
$namespace : string
$hints : string|array<string|int, mixed>
Return values
$this

composer()

Register a view composer event.

public composer(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
$views : array<string|int, mixed>|string
$callback : Closure|string
Return values
array<string|int, mixed>

creator()

Register a view creator event.

public creator(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
$views : array<string|int, mixed>|string
$callback : Closure|string
Return values
array<string|int, mixed>

exists()

Determine if a given view exists.

public exists(string $view) : bool
Parameters
$view : string
Return values
bool

file()

Get the evaluated view contents for the given path.

public file(string $path[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : View
Parameters
$path : string
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
View

make()

Get the evaluated view contents for the given view.

public make(string $view[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : View
Parameters
$view : string
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
View

replaceNamespace()

Replace the namespace hints for the given namespace.

public replaceNamespace(string $namespace, string|array<string|int, mixed> $hints) : $this
Parameters
$namespace : string
$hints : string|array<string|int, mixed>
Return values
$this

share()

Add a piece of shared data to the environment.

public share(array<string|int, mixed>|string $key[, mixed $value = null ]) : mixed
Parameters
$key : array<string|int, mixed>|string
$value : mixed = null
Return values
mixed

Search results