예제 #1
0
<?php

/*
* This file is part of Bricky (https://github.com/s3inlc/bricky)
* Copyright 2016 by Sein Coray
*/
include "inc/template.class.php";
include "inc/lang.class.php";
$TEMPLATE = new Bricky\Template("example_language");
$OBJECTS = array();
//load languages here (Important: Bricky needs the variable to be named $LANGUAGE)
$LANGUAGE = new Bricky\Lang();
echo $TEMPLATE->render($OBJECTS);
예제 #2
0
 public function testForEmpty()
 {
     $template = new Bricky\Template("{{FOR x,!!start!!,!!start!!}}blub{{ENDFOR}}", true);
     $start = 0;
     $result = $template->render(array('start' => $start));
     $this->assertEquals(0, substr_count($result, "blub"));
 }