Template updated
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 12 Oct 2006 05:09:31 +0000 (05:09 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 12 Oct 2006 05:09:31 +0000 (05:09 +0000)
template.php

index 2a37556b85a1591c0aa5c54eba44f11f96026c1c..c14337ee20d6c68fed18087ee4077c7318c050b6 100644 (file)
@@ -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;
        }
        
        // ###################################################################