Skip to content

pgchamberlin/chintz-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chintz PHP

A PHP parser for Chintz libraries.

This is a work-in-progress implementation of the Chintz Parser specified at: https://github.com/pgchamberlin/chintz#chintz-parser

Example usage

Assuming you use Mustache for templates, and default handling for resolved dependencies:

$parser = Chintz_Parser(array(
  'chintz-base-path' => '/absolute/path/to/chintz/library',
  'templater' => new Chintz_Templater_Mustache()
));

$parser->prepare('my-organism');

$data = array(
  'content' => 'This is some data our "my-organism" component knows how to display'
);

echo $parser->render('my-organism', $data);

Is there a demo?

Yes, see it in action or look at the source code.