You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ivan Shalganov 065ccaec23
Merge pull request #335 from WinterSilence/patch-2
4 months ago
.github Create (#2) 5 years ago
docs Update 4 months ago
sandbox Fix #260 6 years ago
src Update Fenom.php 4 months ago
tests Fix travis CI 2 years ago
.coveralls.yml Fixed: Unrecognized option "src_dir" under "coveralls" 6 years ago
.gitignore Add composer.lock to git 8 years ago
.travis.yml TravisCI: fix testing 2 years ago Update 6 years ago up travis and readme 5 years ago Update 9 years ago
composer.json Update license to BSD-3-Clause 12 months ago
composer.lock Fix travis CI 2 years ago Add licenses 10 years ago
phpunit.xml.dist Change code coverage system to CodeClimate 8 years ago

Fenom - Template Engine for PHP

Fenóm - lightweight and fast template engine for PHP.

Quick Start


If you use composer in your project then you can to install Fenom as package. However, if you are not using composer you have to configure autoloader to work with Fenom. Fenom implements the PSR-0 PHP standard to load classes which are located in the src/ directory. Templater already has own autoload-function, to register call method Fenom::registerAutoload:



There is two way to create Fenom instance:

  • Long way: use operator new
  • Shot way: use static factory-method

Long way. Create you own template provider or default provider Fenom\Provider (that is provider read there). Using provider instance create Fenom instance:

$fenom = new Fenom(new Fenom\Provider($template_dir));

After that, set compile directory:


This directory will be used for storing compiled templates, therefore it should be writable for Fenom. Now Fenom is ready to work and now you can to configure it:


Short way. Creating an object via factory method with arguments from long way.

$fenom = Fenom::factory($template_dir, $template_cache_dir, $options);

Now Fenom is ready to work.