https://github.com/leafsphp/veins
Templating engine for Leaf PHP framework
https://github.com/leafsphp/veins
leaf leaf-veins leafphp php-template-engine template-engine
Last synced: about 2 months ago
JSON representation
Templating engine for Leaf PHP framework
- Host: GitHub
- URL: https://github.com/leafsphp/veins
- Owner: leafsphp
- Created: 2019-10-23T16:03:04.000Z (over 5 years ago)
- Default Branch: next
- Last Pushed: 2023-04-28T07:56:39.000Z (about 2 years ago)
- Last Synced: 2025-04-21T22:22:42.913Z (about 2 months ago)
- Topics: leaf, leaf-veins, leafphp, php-template-engine, template-engine
- Language: PHP
- Size: 95.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Leaf Veins
Veins is a simple, lightweight, and fast templating engine for PHP. It is designed to be easy to use and easy to extend.
## Installation
You can install Veins using the Leaf CLI:
```bash
leaf install veins
```Or with composer:
```bash
composer require leafs/veins
```## Usage
```php
configure([
'templateDir' => __DIR__ . '/views/',
'cacheDir' => __DIR__ . '/cache/',
]);
$veins->render('hello', ['name' => 'John']);
``````html
Hello, {$name}!
```## Configuration
You can configure Veins by passing an array to the `configure` method:
```php
$veins->configure([
'checksum' => [],
'charset' => 'UTF-8',
'debug' => false,
'templateDir' => 'views/',
'cacheDir' => 'cache/',
'baseUrl' => '',
'phpEnabled' => false,
'autoEscape' => true,
'sandbox' => true,
'removeComments' => false,
'customTags' => [],
]);
```Find the full documentation at [leafphp.dev/modules/views/veins](https://leafphp.dev/modules/views/veins/).