class PhpViewEngine implements ViewEngineInterface (View source)

Render view files with php.

Methods

__construct(callable $compose, PhpViewFilesystemFinder $finder)

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.

void
pushLayoutContent(PhpView $view)

Push layout content to the top of the stack.

PhpView|null
popLayoutContent()

Pop the top-most layout content from the stack.

string
getLayoutContent()

Pop the top-most layout content from the stack, render and return it.

Details

__construct(callable $compose, PhpViewFilesystemFinder $finder)

Constructor.

Parameters

callable $compose
PhpViewFilesystemFinder $finder

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

void pushLayoutContent(PhpView $view)

Push layout content to the top of the stack.

Parameters

PhpView $view

Return Value

void

PhpView|null popLayoutContent()

Pop the top-most layout content from the stack.

Return Value

PhpView|null

string getLayoutContent()

Pop the top-most layout content from the stack, render and return it.

Return Value

string