The Zend Developer Zone has posted a new article from editor of the dZone, Cal Evans, looking at using fluent interfaces in PHP.
Fluent Interfaces are not a new programming construct. However, PHP developers have not been able to use them until PHP 5. Now with PHP 5 and the ability to directly dereference an object, PHP developers can build objects using fluent interfaces.
He starts off with a look at what they are and how (and why) they can be used in an application. He includes code example to help show how you would create an interface (makeNormal).
The code and other information are pulled from a few sources:- this article by Mike Naberezny
- a post from Paul Jones
- a blog post from Martin Fowler