PHP Classes

File: examples/testinclude.php

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

Contents

Class file image Download
<?php
/**
 * Copyright (c) 2019 Jorge Patricio Castro Castillo MIT License.
 */

use eftec\bladeone\BladeOne;

include
"../lib/BladeOne.php";
$blade=new BladeOne(null, null, BladeOne::MODE_DEBUG);
/** examples/views/Shared/input.blade.php */
$blade->addInclude('Shared.input', 'input');
/** examples/views/Shared/input2.blade.php */
$blade->addInclude('Shared.input2');

$blade->share('globalme', 'it is a global variable');

/** examples/views/Test/include.blade.php */
echo $blade->run("Test.include", ["title" => "VARIABLE TITLE GOES HERE"]);