I’m starting to get a little better at identifying fluent interfaces. This is a programming technique where you can chain method calls together, and it reduces redundant code. Some claim that it is easier to read, but I think that the old way may be a little easier for me at this point, until I get used to this method of calling class methods.
Here’s an example:
$passwordFilter->addFilter(new Zend_Filter_HtmlEntities())
->addFilter(new Zend_Filter_StripTags());


No comments
Comments feed for this article
Trackback link: http://helpdeveloper.com/zend-framework/fluent-interfaces/trackback/