2017 © Pedro Peláez
 

library template

image

assouan/template

  • Saturday, April 23, 2016
  • by Assouan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Template - PHP Library

, (*1)

Simple template engine, (*2)

Installation

Install using composer:, (*3)

$ composer require assouan/template

Usage

Get result, (*4)

$result = Template::render($file_path);

Display result, (*5)

Template::display($file_path);

Example

Template::share('bold', true);

echo Template::render(__DIR__.'/example.tpl.php');
echo Template::render(__DIR__.'/example.tpl.php', ['name' => 'Ryan']);
echo Template::render(__DIR__.'/example.tpl.php', ['name' => 'Jeanne']);
<?php if (isset($bold)): ?>
Hello <b><?=$name?></b>!
<?php else: ?>
Hello <?=$name?>!
<?php endif; ?>
<br />

The Versions

23/04 2016

dev-master

9999999-dev

  Sources   Download

The Requires

  • php ^7.0