PHP Classes

File: examples/test3.php

Recommend this page to a friend!
  Classes of Jorge Castro   BladeOne   examples/test3.php   Download  
File: examples/test3.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/test3.php
Date: 4 years ago
Size: 482 bytes
 

Contents

Class file image Download
<?php
include "../lib/BladeOne.php";
use
eftec\bladeone\BladeOne;

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


$records=array(1
   
,2
   
,3
   
,array('b1'=>1,'b2'=>2));



try {
    echo
$blade->run("Test.testdump"
       
, ["name" => "hello"
           
, 'records' => $records
           
, 'emptyArray' => array()
        ]);



} catch (
Exception $e) {
    echo
$e->getMessage();
}