[Lambda-cvs] lambda/classes lambdaTemplate.class.php,1.4,1.5
Status: Pre-Alpha
Brought to you by:
ariejan
From: Ariejan de V. <ar...@us...> - 2004-06-22 21:21:03
|
Update of /cvsroot/lambda/lambda/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3721 Modified Files: lambdaTemplate.class.php Log Message: - Changed methods addPair and delPair to 'assign' and 'unassign'. - Changed some formatting in my editor Index: lambdaTemplate.class.php =================================================================== RCS file: /cvsroot/lambda/lambda/classes/lambdaTemplate.class.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lambdaTemplate.class.php 22 Jun 2004 12:56:44 -0000 1.4 --- lambdaTemplate.class.php 22 Jun 2004 21:20:55 -0000 1.5 *************** *** 4,7 **** --- 4,8 ---- * @package Lambda * @author Adam McMaster <ad...@la...> + * @author Ariejan de Vroom <ar...@la...> * @version $Id$ * @copyright Copyright (C) 2004 Project Lambda *************** *** 15,21 **** class lambdaTemplate extends lambdaObject { ! /** ! * @var array Keys (tags) which will be replaced in this template, of the form {KEY} ! **/ private $keys; --- 16,22 ---- class lambdaTemplate extends lambdaObject { ! /** ! * @var array Keys (tags) which will be replaced in this template, of the form {KEY} ! **/ private $keys; *************** *** 49,53 **** * @return bool TRUE if successful, FALSE if key already exists **/ ! function addPair($key,$value) { if(!in_array($key,$this->keys)) { array_push($this->keys,'/\{'.$key.'\}/'); /* Surround key with { and }, and the key*/ --- 50,54 ---- * @return bool TRUE if successful, FALSE if key already exists **/ ! function assign($key,$value) { if(!in_array($key,$this->keys)) { array_push($this->keys,'/\{'.$key.'\}/'); /* Surround key with { and }, and the key*/ *************** *** 66,70 **** * @return bool TRUE on success, FALSE if the key was not found **/ ! function delPair($key) { if($keyID = array_search($key,$this->keys)) { $this->keys[$keyID] = $this->values[$keyID] = NULL; --- 67,71 ---- * @return bool TRUE on success, FALSE if the key was not found **/ ! function unassign($key) { if($keyID = array_search($key,$this->keys)) { $this->keys[$keyID] = $this->values[$keyID] = NULL; |