pronskiy / leafs-view-php

Templating engine for Leaf PHP framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Leaf View PHP

Pure PHP views for Leaf/

Installation

You can install Veins using the Leaf CLI:

leaf install view-php

Or with composer:

composer require leafs/view-php

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

use Leaf\ViewPhp;

$veins = new ViewPHP();
$veins->render('views/hello.php', ['name' => 'John']);
<!-- views/hello.php -->
<h1>Hello, {$name}!</h1>

Configuration

You can configure Veins by passing an array to the configure method:

$veins->configure([
    'debug' => false,
    'templateDir' => 'views/',
]);

About

Templating engine for Leaf PHP framework


Languages

Language:PHP 100.0%