palmtree/template

Template component for Palmtree PHP

Installs: 100

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/palmtree/template

v1.0.0 2017-11-12 00:49 UTC

This package is auto-updated.

Last update: 2025-09-19 11:54:58 UTC


README

Templating component for Palmtree PHP

Usage

<?php
use Palmtree\Template\Template;

$template = new Template('front-page.php');

$template['document_title'] = 'Hello World Site';
$template['heading']        = 'Hello World';
$template['content']        = '<p>Welcome to the Hello World site</p>';

echo $template;
<!-- front-page.php -->
<!doctype html>
<html>
<head>
    <title><?php echo $document_title; ?></title>
</head>
<body>
<main>
    <h1><?php echo $heading; ?></h1>
    <?php echo $content; ?>
</main>
</body>
</html>

License

Released under the MIT license