Skip to content

TemplateEngine

Methods

exists

Check to see if a template exists.

public exists(string $name): bool

Parameters:

Parameter Type Description
$name string The service name.

Return Value:

True if the container has the service, false otherwise.

Throws:

If the template name is invalid.


getTemplatePath

Convert a template name to a file path.

public getTemplatePath(string $name): string

Parameters:

Parameter Type Description
$name string The template name.

Return Value:

The file path of the template.

Throws:

If the template name is invalid.

If the template namespace does not exist.


callFunction

Call a function that has been registered with the templating engine.

public callFunction(string $name, array $arguments = []): mixed

Parameters:

Parameter Type Description
$name string The function name.
$arguments array The arguments to supply to the function.

Return Value:

The function result.



Automatically generated on 2025-10-13