From e4315ee3605eaf80fd1a5bb32485d5a2bc4a0938 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 12 Oct 2006 05:09:31 +0000 Subject: [PATCH] Template updated --- template.php | 71 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/template.php b/template.php index 2a37556..c14337e 100644 --- a/template.php +++ b/template.php @@ -128,21 +128,6 @@ class Template */ var $pre_parse_hook = ':=NO METHOD=:'; - /** - * Fields array that is used in this module - * @var array - * @access private - */ - var $fields = array( - 'tablename' => array(REQ_YES, null, false), - 'namecolumn' => array(REQ_YES, null, false), - 'datacolumn' => array(REQ_YES, null, false), - 'extrawhere' => array(REQ_NO, null, false), - 'langcall' => array(REQ_YES, null, true), - 'langconst' => array(REQ_YES, null, true), - 'pre_parse_hook' => array(REQ_NO, null, false) - ); - // ################################################################### /** * Constructor @@ -176,31 +161,67 @@ class Template // ################################################################### /** - * Sets an ISSO field + * Sets tablename + * + * @access public + * + * @param string Table name + */ + function setTableName($name) + { + $this->tablename = $name; + } + + // ################################################################### + /** + * Sets namecolumn * * @access public * - * @param string Field name - * @param mixed Value of the field + * @param string Name column name */ - function set($name, $value) + function setNameColumn($name) { - $this->registry->do_set($name, $value, 'template'); + $this->namecolumn = $name; } // ################################################################### /** - * Gets an ISSO field + * Sets datacolumn * * @access public * - * @param string Field name + * @param string Data column name + */ + function setDataColumn($name) + { + $this->datacolumn = $name; + } + + // ################################################################### + /** + * Sets extrawhere + * + * @access public + * + * @param string Extra WHERE SQL clause + */ + function setExtraWhere($sql) + { + $this->extrawhere = $sql; + } + + // ################################################################### + /** + * Sets the pre-parse hook + * + * @access public * - * @return mixed Value of the field + * @param string Method name */ - function get($fieldname) + function setPreParseHook($name) { - return $this->registry->do_get($fieldname, 'template'); + $this->pre_parse_hook = $name; } // ################################################################### -- 2.22.5