Method chaining

From Wikipedia, the free encyclopedia

Method chaining is common in high level programming languages such as PHP. This also appears in languages such as JavaScript, and popular frameworks such as Codeigniter.

Typically a method chain simply consists of many methods which return the object its-self, which may look something like below. Object -> do -> something -> else

Below will teach you how to implement chainable methods in PHP

http://350designs.com/resources/web/chaining-php-methods