class Foo { function transform() { //Some actual code return $this; } function transform2() { //Some actual code return $this; } } $f = new Foo(); $f->transform()->transform2()->transform();
Concise!
12382 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
class Foo { function transform() { //Some actual code return $this; } function transform2() { //Some actual code return $this; } } $f = new Foo(); $f->transform()->transform2()->transform();
You need to create an account or log in to post comments to this site.
If you like this and are ready for a head-rush, go check out the chaining and nesting of array indexors in my random password generator script:
http://www.bigbold.com/snippets/posts/show/1487