PHPackages                             zeptech/code-templates - 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. zeptech/code-templates

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

zeptech/code-templates
======================

Code generation support for PHP

3.0.0(11y ago)21611BSDPHPPHP &gt;=5.3.0

Since Feb 19Pushed 11y ago1 watchersCompare

[ Source](https://github.com/pgraham/php-code-templates)[ Packagist](https://packagist.org/packages/zeptech/code-templates)[ Docs](https://github.com/pgraham/php-code-templates)[ RSS](/packages/zeptech-code-templates/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (10)Used By (1)

PHP Code Templates
==================

[](#php-code-templates)

PHP Code templates (pct) is a PHP library that parses and performs value substitution for PHP class templates.

Creating Templates
------------------

[](#creating-templates)

Defining a template involves creating a file that encapsulates a common structure marked up with areas where values should be substituted in order to create a concrete file that can perform (in the case of code) or provide something useful. PCT supports simple tag substitution as well as conditional and repeating sections.

### Substitution Tags

[](#substitution-tags)

To specify a spot in a template where a value is to be substituted, add a tag with the following grammar:

```
SUBSTITUTION_TAG
