PHPackages                             canteen/parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. canteen/parser

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

canteen/parser
==============

Simple engine for rendering HTML templates.

1.0.4(12y ago)21.1k13MITPHPPHP &gt;=5.4.0

Since Oct 12Pushed 11y ago2 watchersCompare

[ Source](https://github.com/Canteen/CanteenParser)[ Packagist](https://packagist.org/packages/canteen/parser)[ Docs](http://github.com/Canteen/CanteenParser)[ RSS](/packages/canteen-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (6)Used By (3)

\#Canteen Parser

Canteen Parser is a library for managing, loading and rendering templates. For documentation of the codebase, please see [Canteen Parser docs](http://canteen.github.io/CanteenParser/).

\##Installation

Install is available using [Composer](http://getcomposer.org).

```
composer require canteen/parser dev-master
```

Including using the Composer autoloader in your index.

```
require 'vendor/autoload.php';
```

\##Sample Usage

```
use Canteen\Parser\Parser;
$parser = new Parser();

// Load an optional list of templates
$parser->addTemplate('MyTemplate', 'MyTemplate.html');

// Render the template with some substitutions
echo $parser->template(
	'MyTemplate',
	[
		'title' => 'My Page',
		'description' => 'Description goes here!'
	]
);
```

The contents of `MyTemplate.html`

```
	{{title}}
	{{description}}
```

Would echo:

```
	My Page
	Description goes here!
```

\###Rebuild Documentation

This library is auto-documented using [YUIDoc](http://yui.github.io/yuidoc/). To install YUIDoc, run `sudo npm install yuidocjs`. Also, this requires the project [CanteenTheme](http://github.com/Canteen/CanteenTheme) be checked-out along-side this repository. To rebuild the docs, run the ant task from the command-line.

```
ant docs
```

\##License##

Copyright (c) 2013 [Matt Karl](http://github.com/bigtimebuddy)

Released under the MIT License.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Total

5

Last Release

4465d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8c8b26b4bef66000886f554f9498714eddf11bdc41673d33a0f6365a82f293b?d=identicon)[bigtimebuddy](/maintainers/bigtimebuddy)

---

Top Contributors

[![bigtimebuddy](https://avatars.githubusercontent.com/u/864393?v=4)](https://github.com/bigtimebuddy "bigtimebuddy (8 commits)")

---

Tags

templatingmvcviewmarkup

### Embed Badge

![Health badge](/badges/canteen-parser/health.svg)

```
[![Health](https://phpackages.com/badges/canteen-parser/health.svg)](https://phpackages.com/packages/canteen-parser)
```

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[eftec/bladeonehtml

The standalone version Blade Template Engine from Laravel in a single php file

1018.1k5](/packages/eftec-bladeonehtml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
