PHP Classes

File: examples/testswitch.php

Recommend this page to a friend!
  Classes of Jorge Castro   BladeOne   examples/testswitch.php   Download  
File: examples/testswitch.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/testswitch.php
Date: 3 years ago
Size: 441 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.switch"
       
, ["name" => "hello"
           
, 'records' => $records
           
, 'i' => 0
           
, 'j' => 1
       
]);
} catch (
Exception $e) {
    echo
$e->getMessage();
}