Skip to content

Commit 141061e

Browse files
committed
Merge pull request #2 from ozanturksever/feature/phptal
phptal template engine added
2 parents e6cbc39 + c2181f3 commit 141061e

File tree

91 files changed

+10908
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+10908
-1
lines changed

library/config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'php',
2323
'smarty',
2424
'twig',
25+
'phptal',
2526
);
2627

2728
$template_list_version = array(
@@ -33,6 +34,7 @@
3334
'dwoo' => '1.1.1',
3435
'smarty' => '3.1.11',
3536
'twig' => '1.5.1',
37+
'phptal' => '1.2.2',
3638
);
3739
$template_list_package_size = array(
3840
'anetple' => '16 KB',
@@ -43,6 +45,7 @@
4345
'dwoo' => '848 KB',
4446
'smarty' => '1100 KB',
4547
'twig' => '647 KB',
48+
'phptal' => '330 KB',
4649
);
4750

4851
$template_website = array(
@@ -54,4 +57,5 @@
5457
'dwoo' => 'http://dwoo.org',
5558
'smarty' => 'http://www.smarty.net/',
5659
'twig' => 'http://twig-project.org',
60+
'phptal' => 'http://http://phptal.org/',
5761
);

template_engine/phptal/assign.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
require_once 'libs/PHPTAL.php';
3+
try {
4+
$tpl = new PHPTAL($GLOBALS['engine_path'].'/templates/template_assign.html');
5+
$tpl->vars = $GLOBALS['myvar'];
6+
$html = $tpl->execute();
7+
} catch (Exception $e) {
8+
echo "<pre>";
9+
echo $e;
10+
echo "</pre>";
11+
}
12+

0 commit comments

Comments
 (0)