Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Name

get_registered_object

array get_registered_object(string object_name);

Restituisce un riferimento a un oggetto registrato. E' utile quando, dall'interno di una funzione utente, avete bisogno di accedere direttamente a un oggetto registrato.

Example 13.16. get_registered_object


<?php
function smarty_block_foo($params, &$smarty) 
{
  if (isset($params['object'])) {
    // ottengo il riferimento all'oggetto registrato
    $obj_ref = &$smarty->get_registered_object($params['object']);
    // $obj_ref ora è un riferimento all'oggetto
  }
}
?>