PHP Classes

File: examples/test24.php

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


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

    echo
$blade->run('Test.testappend',array());

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