aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/docs/programmers/api-functions/api-register-object.md
blob: c310e8c2a505ad4cbbc70f49d9cf7f535231c106 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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](#advanced.features.objects) for more
information.

See also [`getRegisteredObject()`](#api.get.registered.object), and
[`unregisterObject()`](#api.unregister.object).