class NameProxyViewEngine implements ViewEngineInterface (View source)

Render view files with different engines depending on their filename

Methods

__construct(Application $app, array $bindings, string $default = '')

Constructor

boolean
exists(string $view)

Check if a view exists.

string
canonical(string $view)

Return a canonical string representation of the view name.

make(string[] $views)

Create a view instance from the first view name that exists.

string
getDefaultBinding()

Get the default binding

array
getBindings()

Get all bindings

string
getBindingForFile(string $file)

Get the engine key binding for a specific file

Details

__construct(Application $app, array $bindings, string $default = '')

Constructor

Parameters

Application $app
array $bindings
string $default

boolean exists(string $view)

Check if a view exists.

Parameters

string $view

Return Value

boolean

string canonical(string $view)

Return a canonical string representation of the view name.

Parameters

string $view

Return Value

string

ViewInterface make(string[] $views)

Create a view instance from the first view name that exists.

Parameters

string[] $views

Return Value

ViewInterface

string getDefaultBinding()

Get the default binding

Return Value

string $binding

array getBindings()

Get all bindings

Return Value

array $bindings

string getBindingForFile(string $file)

Get the engine key binding for a specific file

Parameters

string $file

Return Value

string