fenom/docs/usage.md

20 lines
379 B
Markdown
Raw Normal View History

2013-06-28 11:53:53 +04:00
Basic usage
===========
### Creating template engine
```php
$fenom = Fenom::factory('/path/to/templates', '/path/to/template/cache', $options);
//or
$fenom = new Fenom(new FSProvider('/path/to/templates'));
$fenom->setCompileDir('/path/to/template/cache');
$fenom->setOptions($options);
```
### Output template result
```php
$fenom->display("template/name.tpl", $vars);
```