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 Zend_Config
: a tree of configuration options, each one is aZend_Config
object itself
You can also find these code on GitHub
RenderableInterface.php
.. literalinclude:: RenderableInterface.php :language: php :linenos:
Form.php
.. literalinclude:: Form.php :language: php :linenos:
InputElement.php
.. literalinclude:: InputElement.php :language: php :linenos:
TextElement.php
.. literalinclude:: TextElement.php :language: php :linenos:
Tests/CompositeTest.php
.. literalinclude:: Tests/CompositeTest.php :language: php :linenos: