get_registered_object

array get_registered_object (string object_name)

This returns a reference to a registered object. This is useful from within a custom function when you need direct access to a registered object.

Пример 13-16. get_registered_object

function smarty_block_foo($params, &$smarty) {
	if (isset[$params['object']]) {
		// get reference to registered object
   		$obj_ref =& $smarty->&get_registered_object($params['object']);
		// use $obj_ref is now a reference to the object
	}
}