-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_no_comment.php
45 lines (28 loc) · 1.28 KB
/
index_no_comment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/***********************
Nikházy Ákos
index_no_comment.php
The idea is keeping PHP clean from HTML and text.
***********************/
require 'require/head.php';
$cache = new Cache(10);
$template = new Template('index');
$listLineTemplate = new Template('listItem');
$rawTextTemplate = new Template('',' {{texthere}} at rendering');
$text = new Text('index');
$list = '';
for($i = 1; $i<=10; $i++)
{
$listLineTemplate -> tagList['item'] = $text->PrintText('listItemText') . $i;
$list .= $listLineTemplate -> Templating(true,false);
}
$template -> tagList['someText'] = $text->PrintText('someText');
$template -> tagList['content'] = 'This is the content. You should use the Text.class to put text in these parts,
but for the example I write this here. Also this only makes sense if you see
it in the PHP code in index.php';
$template -> tagList['aList'] = $list;
$template -> tagList['otherHTML'] = NULL;
$rawTextTemplate -> tagList['texthere'] = $text -> PrintText('complete');
$template -> tagList['rawStringExample'] = $rawTextTemplate -> Templating();
$template -> tagList['formatedText'] = $text -> PrintText('formatedText','string',3,3.3);
$cache -> cache($template -> Templating());