class CompilerEngine extends PhpEngine (View source)

Properties

protected Filesystem $files

The filesystem instance.

from  PhpEngine
protected CompilerInterface $compiler

The Blade compiler instance.

protected array $lastCompiled

A stack of the last compiled templates.

protected array<string,true> $compiledOrNotExpired

The view paths that were compiled or are not expired, keyed by the path.

Methods

void
__construct(CompilerInterface $compiler, Filesystem $files = null)

Create a new compiler engine instance.

string
get(string $path, array $data = [])

Get the evaluated contents of the view.

string
evaluatePath(string $path, array $data)

Get the evaluated contents of the view at the given path.

void
handleViewException(Throwable $e, int $obLevel)

Handle a view exception.

string
getMessage(Throwable $e)

Get the exception message for an exception.

getCompiler()

Get the compiler implementation.

void
forgetCompiledOrNotExpired()

Clear the cache of views that were compiled or not expired.

Details

void __construct(CompilerInterface $compiler, Filesystem $files = null)

Create a new compiler engine instance.

Parameters

CompilerInterface $compiler
Filesystem $files

Return Value

void

string get(string $path, array $data = [])

Get the evaluated contents of the view.

Parameters

string $path
array $data

Return Value

string

protected string evaluatePath(string $path, array $data)

Get the evaluated contents of the view at the given path.

Parameters

string $path
array $data

Return Value

string

protected void handleViewException(Throwable $e, int $obLevel)

Handle a view exception.

Parameters

Throwable $e
int $obLevel

Return Value

void

Exceptions

Throwable

protected string getMessage(Throwable $e)

Get the exception message for an exception.

Parameters

Throwable $e

Return Value

string

CompilerInterface getCompiler()

Get the compiler implementation.

Return Value

CompilerInterface

void forgetCompiledOrNotExpired()

Clear the cache of views that were compiled or not expired.

Return Value

void