The Engine

Templates

Extensions

The Engine

Plates uses a central object called the Engine, which is used to store the environment configuration, functions and extensions. It helps decouple your templates from the file system and other dependencies. For example, if you want to change the folder where your templates are stored, you can do so by simply changing the path in one location.

Dependency Injection

Plates is designed to be easily passed around your application and easily injected in your controllers or other application objects. Simply pass an instance of the Engine to any consuming objects, and then use either the make() method to create a new template, or the render() method to render it immediately. For example: