function Smarty::get_registered_object in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/lib/smarty/Smarty.class.php \Smarty::get_registered_object()
return a reference to a registered object
Parameters
string $name:
Return value
object
File
- includes/
moodle/ lib/ smarty/ Smarty.class.php, line 1325
Class
- Smarty
- @package Smarty
Code
function &get_registered_object($name) {
if (!isset($this->_reg_objects[$name])) {
$this
->_trigger_fatal_error("'{$name}' is not a registered object");
}
if (!is_object($this->_reg_objects[$name][0])) {
$this
->_trigger_fatal_error("registered '{$name}' is not an object");
}
return $this->_reg_objects[$name][0];
}