Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
paco - a PHP template language
==============================

Copyright (c) 2012 by Tobias Dammers. All rights reserved.

Released under a BSD-3 license. See the included LICENSE for details.

INSTALLING
----------
Download paco using git:

git clone git@bitbucket.org:tdammers/paco.git

That's about it. Paco requires PHP >= 5.4 and little more. To run the tests,
you need bash or a compatible shell, and you need to have the CLI version of
PHP installed.

USAGE
-----
To use paco in your project, include paco.php from the project root. This will
take care of including anything required. From there, applying a paco template
is a two-step process: first, load the file and parse it, which gives you an
AST object. Then, you can either run this AST object directly against a
context, or you can use the included PHP writer to compile it into PHP code. If
your templates are complicated, you may have to raise PHP's function call
limit.

The compiled code is usually faster by a factor of 10 or more, and since
templates don't typically change once deployed, it is recommended that you use
the compiler for production use.

For details, browse the /tests directory, especially lib.php and rundir.php,
which contain the core testing infrastructure and demonstrate typical usage.

BUGS
----
I am unable to completely deny the possibility of their presence. Feel free to
report any problems to tdammers@gmail.com.

A NOTE FOR WINDOWS USERS
------------------------
Paco's core code is written in platform-agnostic PHP and will probably work
fine on Windows. For the tests, you absolutely need a bash-compatible shell;
cygwin provides a version that should work. Paco hasn't been tested on Windows
though, and I am unable to provide any Windows support myself.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.