ZF-3513: The "remove" family of methods in Zend_Form et al should not return Boolean
The "remove" method family (Zend_Form::removeElement(), Zend_Form_DisplayGroup::removeDecorator(), Zend_Form_Element::removeValidator(), etc) should not return a Boolean but an Object. Either these methods should return the Object they remove or the Object on which the method is called, which is fairly standard behavior for pushing and popping Stack Objects. In languages where garbage collection is an issue, the Stack returns the object popped, so that it can be explicitly destroyed. In a language such as PHP where garbage collection isn't as much of an issue, the Stack should return itself, to allow additional method chaining on itself.
In the case of Zend_Form, this latter approach would be invaluable, as a developer could then perform an action such as:
$Form = new Zend_Form; $Form->removeDecorator('FormElements')->addDecorator('Fieldset')->addDecorator('FormElements'); echo $Form;