fission-commits Mailing List for Fission Template Engine
Status: Planning
Brought to you by:
heimidal
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <hei...@us...> - 2003-08-22 20:44:19
|
Update of /cvsroot/fission/Fission
In directory sc8-pr-cvs1:/tmp/cvs-serv6987
Modified Files:
Fission.php
Log Message:
Enabled batch template var setting.
Index: Fission.php
===================================================================
RCS file: /cvsroot/fission/Fission/Fission.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Fission.php 13 Aug 2003 00:30:05 -0000 1.5
--- Fission.php 22 Aug 2003 15:56:46 -0000 1.6
***************
*** 28,31 ****
--- 28,34 ----
var cache_root = '';
+ // Contains an array of current template vars.
+ var _tpl_vars = array();
+
// __construct function introduced in PHP5.
//
***************
*** 59,62 ****
--- 62,96 ----
{
+ }
+
+ // Defines a single or a set of template
+ // variables to be replaced within templates.
+ // For the time being, error handling is
+ // transparent.
+ //
+ // @var vars public string|array
+ // @var var_content public string optional
+ function set_vars($vars, $var_content=false)
+ {
+ if(is_array( $vars ))
+ {
+ foreach( $vars as $key => $val )
+ {
+ if(preg_match('/^[a-z][a-z0-9_-]+/', $key))
+ {
+ $this->_tpl_vars[$key] = $val;
+ }
+ }
+ return true;
+ }
+ elseif( (!empty($vars)) && (preg_match('/^[a-z][a-z0-9_-]+/', $vars)) && (!empty($vars_content)) )
+ {
+ $this->_tpl_vars[$vars] = $var_content;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
|
|
From: <nor...@us...> - 2003-08-13 00:58:17
|
Update of /cvsroot/fission/Fission In directory sc8-pr-cvs1:/tmp/cvs-serv20431 Modified Files: Fission.php Log Message: Index: Fission.php =================================================================== RCS file: /cvsroot/fission/Fission/Fission.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Fission.php 29 Jun 2003 06:47:26 -0000 1.4 --- Fission.php 13 Aug 2003 00:30:05 -0000 1.5 *************** *** 1,63 **** ! <? ! ! // Fission Template Engine for PHP ! // http://fission.phpmp.net/ ! // ! // Copyright 2003, Fission Development Group. ! // All rights reserved. ! // ! // This software is released under the GPL license. ! // A copy has been included in the docs/ directory. ! // Please review it before use. ! // ! // The following code has been as well documented ! // in this file as possible. For complete ! // documentation, please visit ! // http://fission.phpmp.net/docs/. ! ! // This class holds the entirety of Fission. ! class Fission ! { ! ! // Contains the path to the templates. ! // Can be absolute or relative. ! var tpl_root = ''; ! ! // Contains the path to the template cache. ! // Can be absolute or relative. ! var cache_root = ''; ! ! // __construct function introduced in PHP5. ! // ! // @var root public string ! // @var c_root public string ! function __construct($root = '.', $c_root = './cache') ! { ! $this->tpl_root = $root; ! $this->cache_root = $c_root; ! } ! ! // Function present for backward-compatibility ! // with PHP4. ! // ! // @var root public string ! // @var c_root public string ! function Fission($root = '.', $c_root = './cache') ! { ! $this->tpl_root = $root; ! $this->cache_root = $c_root; ! } ! ! // Starts a Fission Template session. ! // From here, you may call as many templates as ! // you wish. This simply establishes the base ! // code style as well as the directory under which ! // template data will be cached. ! // ! // @var tpl_name public string ! function start($tpl_name) ! { ! ! } ! ! } \ No newline at end of file --- 1,65 ---- ! <?php ! ! // Fission Template Engine for PHP ! // http://fission.phpmp.net/ ! // ! // Copyright 2003, Fission Development Group. ! // All rights reserved. ! // ! // This software is released under the GPL license. ! // A copy has been included in the docs/ directory. ! // Please review it before use. ! // ! // The following code has been as well documented ! // in this file as possible. For complete ! // documentation, please visit ! // http://fission.phpmp.net/docs/. ! ! // This class holds the entirety of Fission. ! class Fission ! { ! ! // Contains the path to the templates. ! // Can be absolute or relative. ! var tpl_root = ''; ! ! // Contains the path to the template cache. ! // Can be absolute or relative. ! var cache_root = ''; ! ! // __construct function introduced in PHP5. ! // ! // @var root public string ! // @var c_root public string ! function __construct($root = '.', $c_root = './cache') ! { ! $this->tpl_root = $root; ! $this->cache_root = $c_root; ! } ! ! // Function present for backward-compatibility ! // with PHP4. ! // ! // @var root public string ! // @var c_root public string ! function Fission($root = '.', $c_root = './cache') ! { ! $this->tpl_root = $root; ! $this->cache_root = $c_root; ! } ! ! // Starts a Fission Template session. ! // From here, you may call as many templates as ! // you wish. This simply establishes the base ! // code style as well as the directory under which ! // template data will be cached. ! // ! // @var tpl_name public string ! function start($tpl_name) ! { ! ! } ! ! } ! ! ?> |
|
From: <hei...@us...> - 2003-06-29 06:47:28
|
Update of /cvsroot/fission/Fission
In directory sc8-pr-cvs1:/tmp/cvs-serv17305
Modified Files:
Fission.php
Log Message:
again
Index: Fission.php
===================================================================
RCS file: /cvsroot/fission/Fission/Fission.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Fission.php 29 Jun 2003 06:45:40 -0000 1.3
--- Fission.php 29 Jun 2003 06:47:26 -0000 1.4
***************
*** 17,21 ****
// This class holds the entirety of Fission.
- // Initialize this class to use it.
class Fission
{
--- 17,20 ----
|