2017 © Pedro Peláez
 

library parser

Simple engine for rendering HTML templates.

image

canteen/parser

Simple engine for rendering HTML templates.

  • Saturday, February 22, 2014
  • by bigtimebuddy
  • Repository
  • 2 Watchers
  • 1 Stars
  • 228 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Canteen Parser

Canteen Parser is a library for managing, loading and rendering templates. For documentation of the codebase, please see Canteen Parser docs., (*1)

Installation

Install is available using Composer., (*2)

composer require canteen/parser dev-master

Including using the Composer autoloader in your index., (*3)

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, (*4)

    <h1>{{title}}</h1>
    <div class="description">{{description}}</div>

Would echo:, (*5)

    <h1>My Page</h1>
    <div class="description">Description goes here!</div>

Rebuild Documentation

This library is auto-documented using YUIDoc. To install YUIDoc, run sudo npm install yuidocjs. Also, this requires the project CanteenTheme be checked-out along-side this repository. To rebuild the docs, run the ant task from the command-line., (*6)

ant docs

License

Copyright (c) 2013 Matt Karl, (*7)

Released under the MIT License., (*8)

The Versions

22/02 2014

dev-master

9999999-dev http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view

22/02 2014

1.0.2

1.0.2.0 http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view

22/02 2014

1.0.3

1.0.3.0 http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view

22/02 2014

1.0.4

1.0.4.0 http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view

12/10 2013

1.0.0

1.0.0.0 http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view

12/10 2013

1.0.1

1.0.1.0 http://github.com/Canteen/CanteenParser

Simple engine for rendering HTML templates.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

templating mvc markup view