You are here

function Smarty::register_object in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/smarty/Smarty.class.php \Smarty::register_object()

Registers object to be used in templates

Parameters

string $object name of template object:

object &$object_impl the referenced PHP object to register:

null|array $allowed list of allowed methods (empty = all):

boolean $smarty_args smarty argument format, else traditional:

null|array $block_functs list of methods that are block format:

File

includes/moodle/lib/smarty/Smarty.class.php, line 715

Class

Smarty
@package Smarty

Code

function register_object($object, &$object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) {
  settype($allowed, 'array');
  settype($smarty_args, 'boolean');
  $this->_reg_objects[$object] = array(
    &$object_impl,
    $allowed,
    $smarty_args,
    $block_methods,
  );
}