Date: 01/09/01
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: uw: "[phplib-dev] cvs commit"
- Next in thread: uw: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: uw
Date: Tue Jan 9 23:14:10 2001
Modified files:
php-lib/php/ext/integratedtemplateextension.inc
Log message:
Fixed a constructor bug.
Added two function get informations on the blocks found in the template - the new form2template bridge requires this.
Index: php-lib/php/ext/integratedtemplateextension.inc
diff -u php-lib/php/ext/integratedtemplateextension.inc:1.4 php-lib/php/ext/integratedtemplateextension.inc:1.5
--- php-lib/php/ext/integratedtemplateextension.inc:1.4 Wed Dec 20 19:58:21 2000
+++ php-lib/php/ext/integratedtemplateextension.inc Tue Jan 9 23:13:38 2001
@@ -13,7 +13,7 @@
*
* <email protected> Ulf Wendel <uw <email protected>>
* <email protected> public
-* <email protected> 1.0 22/09/00
+* <email protected> $Id: integratedtemplateextension.inc,v 1.5 2001/01/09 22:13:38 uw Exp $
*/
class IntegratedTemplateExtension extends IntegratedTemplate {
@@ -91,14 +91,14 @@
*
* <email protected> IntegratedTemplate()
*/
- function IntegratedTemplateExtension() {
+ function IntegratedTemplateExtension($root = "") {
$this->checkblocknameRegExp = "@".$this->blocknameRegExp."@";
$this->functionRegExp = "@".$this->functionPrefix."(".$this->functionnameRegExp.")\s*\( <email protected>";
- $this->IntegratedTemplate();
+ $this->IntegratedTemplate($root);
- } // end func IntegratedTemplateExtension
+ } // end func constructor
function init() {
@@ -419,6 +419,33 @@
} // end func setCallbackFunctiontable
/**
+ * Returns a list of blocknames in the template.
+ *
+ * <email protected> array [blockname => blockname]
+ * <email protected> public
+ * <email protected> blockExists()
+ */
+ function getBlocklist() {
+
+ $blocklist = array();
+ foreach ($this->blocklist as $block => $content)
+ $blocklist[$block] = $block;
+
+ return $blocklist;
+ } // end func getBlocklist
+
+ /**
+ * Checks wheter a block exists.
+ *
+ * <email protected> string
+ * <email protected> boolean
+ * <email protected> getBlocklist()
+ */
+ function blockExists($blockname) {
+ return isset($this->blocklist[$blockname]);
+ } // end func blockExists
+
+ /**
* Builds a functionlist from the template.
*/
function buildFunctionlist() {
@@ -499,6 +526,7 @@
/**
* Deletes one or many variables from the block variable list.
+ *
* <email protected> string Blockname
* <email protected> mixed Name of one variable or array of variables ( array ( name => true ) ) to be stripped.
*/
@@ -516,6 +544,7 @@
/**
* Updates the variable list of a block.
+ *
* <email protected> string Blockname
*/
function updateBlockvariablelist($block) {
@@ -527,6 +556,7 @@
/**
* Returns an array of blocknames where the given variable placeholder is used.
+ *
* <email protected> string Variable placeholder
* <email protected> array $parents parents[0..n] = blockname
*/
@@ -545,7 +575,7 @@
return $parents;
} // end func findPlaceholderBlocks
-
+
/**
* Handles warnings, saves them to $warn and prints them or calls die() depending on the flags
* <email protected> string Warning
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: uw: "[phplib-dev] cvs commit"
- Next in thread: uw: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

