Method chaining
From Wikipedia, the free encyclopedia
| This article or section is in need of attention from an expert on the subject. Please help recruit one or improve this article yourself. See the talk page for details. Please consider using {{Expert-subject}} to associate this request with a WikiProject |
| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (May 2008) |
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

