summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_registerclass.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_registerclass.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php b/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
index de89b4c..8d18547 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_registerclass.php
@@ -25,8 +25,8 @@ class Smarty_Internal_Method_RegisterClass
* @link http://www.smarty.net/docs/en/api.register.class.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $class_name
- * @param string $class_impl the referenced PHP class to
+ * @param string $class_name
+ * @param string $class_impl the referenced PHP class to
* register
*
* @return \Smarty|\Smarty_Internal_Template
@@ -34,7 +34,7 @@ class Smarty_Internal_Method_RegisterClass
*/
public function registerClass(Smarty_Internal_TemplateBase $obj, $class_name, $class_impl)
{
- $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
+ $smarty = $obj->_getSmartyObj();
// test if exists
if (!class_exists($class_impl)) {
throw new SmartyException("Undefined class '$class_impl' in register template class");
@@ -43,4 +43,4 @@ class Smarty_Internal_Method_RegisterClass
$smarty->registered_classes[ $class_name ] = $class_impl;
return $obj;
}
-} \ No newline at end of file
+}