PHP Classes

File: examples/testsmall.php

Recommend this page to a friend!
  Classes of Jorge Castro   BladeOne   examples/testsmall.php   Download  
File: examples/testsmall.php
Role: Example script
Content type: text/plain
Description: Example script
Class: BladeOne
Standalone template engine that compiles into PHP
Author: By
Last change: Update of examples/testsmall.php
Date: 4 years ago
Size: 455 bytes
 

Contents

Class file image Download
<?php
/**
 * Copyright (c) 2016 Jorge Patricio Castro Castillo MIT License.
 */
include "../lib/BladeOne.php";
use
eftec\bladeone\BladeOne;

$views = __DIR__ . '/views';
$compiledFolder = __DIR__ . '/compiled';
$blade=new BladeOne($views,$compiledFolder,BladeOne::MODE_SLOW);



try {
    echo
$blade->run("Test.child"
       
, ["name" => "hello world"]);
} catch (
Exception $e) {
    echo
"error found ".$e->getMessage()."<br>".$e->getTraceAsString();
}