Get Smarty

Donate

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

Buy cheap glasses from Cheapglasses123.com and save up to 80%.

Where to buy prescription glasses? EyewearCanada.com is your best choice!

Advertisement

Name

registerObject() — 注册对象

说明

void registerObject(string object_name,
                    object object,
                    array allowed_methods_properties,
                    boolean format,
                    array block_methods);

Note

在你注册/传递对象到模板时,请记住对象在模板中使用的成员变量和方法均只为了显示。通过对象在模板中进行一些更复杂的应用逻辑是很容易的事情,但这样会成为较差的设计,并且难以管理。请参见Smarty网站上关于最佳实践的主题。

详情参见对象

参见 getRegisteredObject(), 和 unregisterObject().

Comments
No comments for this page.

Advertisement