• PHP reference
  • Core
  • View
  • Engine

TemplumEngine

class Core\View\Engine\TemplumEngine implements EngineInterface

Class TemplumEngine.

Methods

__construct(string $views_root, string $partials_root = null, null|mixed $caching = null)

Constructor.

Parameters

  • string $views_root
  • string $partials_root
  • null|mixed $caching

registerHelper(string $name, callable $callable)

Register a helper function with the engine.

Parameters

  • string $name
  • callable $callable

string getTemplateFilename(string $name)

Get the template filename.

Parameters

  • string $name

Return Value

  • string

string render(string $filename, array $data)

Render the template with filename and return the output.

Parameters

  • string $filename
  • array $data

Return Value

  • string