Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

pdeffendol/tingle

Repository files navigation

Tingle

Tingle is a lightweight PHP template system that avoids the need for a
separate template language (like Smarty.) It will support add-on functionality
as “helpers” and the ability to use a layout template for consistent and DRY
code.

Requirements

  • PHP 5.3+ (Tingle uses namespaces)
  • PHPUnit to run test suite

Features

Unlike some other PHP template libraries that introduce a secondary template
“language,” Tingle uses plain PHP in its templates. It is up to the developer
to ensure separation between business logic and presentation.

Low Overhead

Frameworks like the Zend Framework offer similar template systems, but make it
difficult to use only the template portion of the framework without including
loads of other classes. Tingle is focused on a single task – rendering
templates – and can be used by itself or incorporated into your PHP
application framework.

Helper Classes

Tingle’s helper classes provide groups of methods that aid in producing your
application’s view layer. These are usually data formatting routines or macros
that reduce repetition in your templates. Each helper class defines one or
more methods that may be called from your template.

Layouts

Layouts are templates that provide a common structure to your rendered views.
Typically you will use layouts to define the basic structure of your page. The
content of your view template will be inserted into the layout at the point(s)
you specify. This avoids the problem presented by other templating systems in
which you must split your layouts into a “header” template and a “footer”
template, and remember to include them in each of your views.

Usage

  1. Drop the Tingle library into your project.
  2. “require” lib/autoload.php in your PHP script.

About

Tingle is a lightweight PHP template library that doesn't force you to learn a separate template language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published