From 9ba545097679eddb360ce793e4fb860a807bdd59 Mon Sep 17 00:00:00 2001 From: mohrt Date: Mon, 17 Feb 2003 17:56:35 +0000 Subject: [PATCH] add function for getting reference to registered object --- Smarty.class.php | 12 ++++++++++++ libs/Smarty.class.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Smarty.class.php b/Smarty.class.php index e3a465be..00016eef 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -1317,6 +1317,18 @@ class Smarty } + /** + * return a reference to a registered object + * + * @param string $name + */ + function &get_registered_object($name) { + if(isset($this->_reg_objects[$name])) { + return $this->_reg_objects[$name][0]; + } else { + return false; + } + } /**#@+ * @access private diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index e3a465be..00016eef 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1317,6 +1317,18 @@ class Smarty } + /** + * return a reference to a registered object + * + * @param string $name + */ + function &get_registered_object($name) { + if(isset($this->_reg_objects[$name])) { + return $this->_reg_objects[$name][0]; + } else { + return false; + } + } /**#@+ * @access private