PHP Classes

File: examples/testinclude_scope.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  BladeOne  >  examples/testinclude_scope.php  >  Download  
File: examples/testinclude_scope.php
Role: Example script
Content type: text/plain
Description: Example script
Class: BladeOne
Standalone template engine that compiles into PHP
Author: By
Last change:
Date: 10 months ago
Size: 656 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);
$blade->pipeEnable=true;
$blade->includeScope=false;
echo
"<h1>Running with include scope=false</h1>";
/** examples/views/Test/include.blade.php */
echo $blade->run("Test.include2", ["g1" => "GLOBAL VARIABLE G1","g2"=>"GLOBAL VARIABLE G2"]);

$blade->includeScope=true;
echo
"<h1>Running with include scope=true</h1>";
/** examples/views/Test/include.blade.php */
echo $blade->run("Test.include2", ["g1" => "GLOBAL VARIABLE G1","g2"=>"GLOBAL VARIABLE G2"]);


For more information send a message to info at phpclasses dot org.