leonickl/plate

There is no license information available for the latest version (v1.0.1) of this package.

A PHP templating engine

Maintainers

Package info

github.com/leonickl/plate

pkg:composer/leonickl/plate

Statistics

Installs: 10

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-04-21 16:24 UTC

This package is auto-updated.

Last update: 2026-04-21 16:25:48 UTC


README

The name is derived from Laravel's "blade". Blade offers a simple templating engine that can be compiled to a regular PHP file.

Examples can be found in example.plate. Try running php index.php | php to compile the example to view the compiles PHP.

Compilation is achieved calling LeoNickl\Plate\Plate::file('filename.plate') whose result can be cast to a string that contains the PHP code.

Plate directives are embraced in double curly braces ({{ "hello" }}). A single expression or multiple expressions separated by commas are escaped and then printed. Prefixing a single expression with == omits escaping. Using :as a prefix, nothing is printed, but the raw following PHP code is executed. Conditional rendering with if, elseif, and else is supported, as well as foreach loops with each. For details, seee example.plate.