From f76b8b1ab352f08515255204faddfc69b43e2bb6 Mon Sep 17 00:00:00 2001 From: Trismegiste Date: Sat, 11 May 2013 01:22:18 +0200 Subject: [PATCH] you MUST inherit from the component contract. If not, this is no longer a composite pattern --- Composite/Form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Composite/Form.php b/Composite/Form.php index c3a8f46..18ad54b 100644 --- a/Composite/Form.php +++ b/Composite/Form.php @@ -13,8 +13,10 @@ namespace DesignPatterns\Composite; * subsequently runs trough all its child elements and calls render() on them * - Zend_Config: a tree of configuration options, each one is a Zend_Config object * + * The composite node MUST extend the component contract. This is mandatory for building + * a tree of component. */ -class Form +class Form extends FormElement { protected $_elements;