Get Smarty

Donate

Paypal

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

Get the juciest casino bonuses at this great website

If you are looking for great entertainment online, then we would like to recommend CasinoAdvisers.com. Find the best casino bonus available and much more that makes your casino experience much more enjoyable!

Name

getRegisteredObject() — 获取已注册对象

说明

array getRegisteredObject(string object_name);

该函数可以很方便地在自定义函数中获取一个注册对象。详情参见 对象

Example 14.28. getRegisteredObject()


<?php
function smarty_block_foo($params, $smarty)
{
  if (isset($params['object'])) {
    // 获取已注册对象
    $obj_ref = $smarty->getRegisteredObject($params['object']);
    // 现在可通过 $obj_ref 来操作对象
  }
}
?>

   

参见 registerObject(), unregisterObject()对象

Comments
No comments for this page.

Advertisement