PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Name

registerObject() — register an object for use in the templates

Description

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

Note

When you register/assign objects to templates, be sure that all properties and methods accessed from the template are for presentation purposes only. It is very easy to inject application logic through objects, and this leads to poor designs that are difficult to manage. See the Best Practices section of the Smarty website.

See the objects section for more information.

See also getRegisteredObject(), and unregisterObject().

Smarty Template Engine