PHP Classes

File: tests/testParser.php

Recommend this page to a friend!
  Classes of Jose Maria Rodriguez Millan   Siviglia Templating 2   tests/testParser.php   Download  
File: tests/testParser.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Siviglia Templating 2
Template engine with configurable grammar
Author: By
Last change:
Date: 11 years ago
Size: 1,717 bytes
 

Contents

Class file image Download
<?php
  define
(PROJECTPATH,getcwd());
 
define(SIVIGLIA_PATH,realpath(getcwd()."/../templating")."/");
  include_once(
SIVIGLIA_PATH."TemplateParser2.php");
  include_once(
SIVIGLIA_PATH."TemplateHTMLParser.php");
 
 
$oLParser=new CLayoutHTMLParserManager();
 
$widgetPath=array("/widgets/");
 
$oManager=new CLayoutManager("html",$widgetPath,array("L"=>array("lang"=>"en")));

 
//$definition=array("TEMPLATE"=>PROJECTPATH."/templates/HelloWorld.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/SimpleBox.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/SimpleBox2.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/TitledBox.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox1.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox2.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox3.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox4.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox5.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox6.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/NewsBox7.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/FullPage.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/Ltest.html");
  //$definition=array("TEMPLATE"=>PROJECTPATH."/templates/SampleJs.html");
 
$definition=array("TEMPLATE"=>PROJECTPATH."/templates/PathWidget.html");
 
//$definition=array("TEMPLATE"=>PROJECTPATH."/templates/SampleCss.html");
 
$oManager->renderLayout($definition,$oLParser,true);

?>