To treat a group of objects the same way as a single instance of the object.
- a form class instance handles all its form elements like a single instance of the form, when
render()
is called, it subsequently runs through all its child elements and callsrender()
on them
You can also find this code on GitHub
Renderable.php
Renderable.php
Form.php
Form.php
InputElement.php
InputElement.php
TextElement.php
TextElement.php
Tests/CompositeTest.php
Tests/CompositeTest.php