* The SquirrelMail (Foowd) template implementation.
* Derived from the foowd template implementation and adapted
* for squirrelmail
- * @copyright © 2005-2006 The SquirrelMail Project Team
+ * @copyright © 2005-2007 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @author Paul James
* @author Monte Ohrt <monte at ispi.net>
* @author Andrei Zmievski <andrei at php.net>
- * @author Paul Lesniewski
+ * @author Paul Lesniewski <paul at squirrelmail.org>
* @package squirrelmail
*
*/
}
+ /**
+ * Clears the values of all assigned varaiables.
+ *
+ */
+ function clear_all_assign() {
+
+ $this->values = array();
+
+ }
+
+ /**
+ * Returns assigned variable value(s).
+ *
+ * @param string $varname If given, the value of that variable
+ * is returned, assuming it has been
+ * previously assigned. If not specified
+ * an array of all assigned variables is
+ * returned. (optional)
+ *
+ * @return mixed Desired single variable value or list of all
+ * assigned variable values.
+ *
+ */
+ function get_template_vars($varname=NULL) {
+
+ // just looking for one value
+ //
+ if (!empty($varname)) {
+ if (!empty($this->values[$varname]))
+ return $this->values[$varname];
+ else
+// FIXME: this OK? What does Smarty do?
+ return NULL;
+ }
+
+
+ // return all variable values
+ //
+ return $this->values;
+
+ }
+
/**
* Appends values to template variables
*