Go to file
Ivan Shalganov fbf4f46f1f
Merge pull request #341 from fenom-template/v3.0.0
Migrate to php8
2023-02-27 09:38:43 +01:00
.github migrate to php8 2023-02-23 22:01:33 +01:00
docs Update extend.md 2022-06-12 12:10:23 +03:00
sandbox Fix #260 2017-04-22 15:59:20 +03:00
src migrate to php8 2023-02-23 21:50:12 +01:00
tests migrate to php8 2023-02-23 21:50:12 +01:00
.coveralls.yml Fixed: Unrecognized option "src_dir" under "coveralls" 2016-10-10 11:58:50 +03:00
.gitignore migrate to php8 2023-02-06 23:49:54 +01:00
.travis.yml TravisCI: fix testing 2020-07-06 11:35:15 +03:00
CHANGELOG.md migrate to php8 2023-02-23 21:53:03 +01:00
README.md migrate to php8 2023-02-23 22:09:39 +01:00
authors.md Update authors.md 2013-07-04 01:48:54 +04:00
composer.json migrate to php8 2023-02-05 21:59:04 +01:00
composer.lock migrate to php8 2023-02-23 22:03:07 +01:00
license.md Add licenses 2013-04-28 18:08:57 +04:00
phpunit.xml.dist migrate to php8 2023-02-05 21:59:04 +01:00

README.md

Fenom - Template Engine for PHP

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


Quick Start

Install

If you use composer in your project then you can to install Fenom as package.

Setup

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:

$fenom->setCompileDir($template_cache_dir);

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:

$fenom->setOptions($options);

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.

Usage

Example