summaryrefslogtreecommitdiff
path: root/demo/index_php_template.php
diff options
context:
space:
mode:
authormonte.ohrt <monte.ohrt@localhost>2011-09-16 14:19:56 +0000
committermonte.ohrt <monte.ohrt@localhost>2011-09-16 14:19:56 +0000
commit8842e79107dd588fba782ca335133a3f0f70de98 (patch)
tree1c8c8ddc301b0ce1f6c5ebf4e6228db12aa2817f /demo/index_php_template.php
parent5693de91f5a6a894db763c6b8b24eba49ab5f754 (diff)
downloadsmarty-8842e79107dd588fba782ca335133a3f0f70de98.tar.gz
smarty-8842e79107dd588fba782ca335133a3f0f70de98.tar.bz2
smarty-8842e79107dd588fba782ca335133a3f0f70de98.zip
commit 3.1 into the trunk
Diffstat (limited to 'demo/index_php_template.php')
-rw-r--r--demo/index_php_template.php49
1 files changed, 0 insertions, 49 deletions
diff --git a/demo/index_php_template.php b/demo/index_php_template.php
deleted file mode 100644
index 2f95bf67..00000000
--- a/demo/index_php_template.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
-* Test script for PHP template
-* @author Monte Ohrt <monte at ohrt dot com>
-* @package SmartyTestScripts
-*/
-require('../libs/Smarty.class.php');
-
- class Person
-{
- private $m_szName;
- private $m_iAge;
-
- public function setName($szName)
- {
- $this->m_szName = $szName;
- return $this; // We now return $this (the Person)
- }
-
- public function setAge($iAge)
- {
- $this->m_iAge = $iAge;
- return $this; // Again, return our Person
- }
-
- public function introduce()
- {
- return 'Hello my name is '.$this->m_szName.' and I am '.$this->m_iAge.' years old.';
- }
-}
-
-$smarty = new Smarty();
-$smarty->allow_php_templates= true;
-$smarty->force_compile = false;
-$smarty->caching = true;
-$smarty->cache_lifetime = 100;
-//$smarty->debugging = true;
-
-$smarty->assign('foo',"'bar'");
-
-$person = new Person;
-
-$smarty->assign('person',$person);
-
-$smarty->assign('array',array('a'=>array('aa'=>'This is a long string'),'b'=>2));
-
-$smarty->display('php:index_view.php');
-
-?>