Skip to content

Instantly share code, notes, and snippets.

@TheOpenDevProject
Last active January 28, 2016 05:02
Show Gist options
  • Save TheOpenDevProject/ebfbdc1b91eb89f4161a to your computer and use it in GitHub Desktop.
Save TheOpenDevProject/ebfbdc1b91eb89f4161a to your computer and use it in GitHub Desktop.
<?php
interface stuffShouldDo{
public function whoo();
}
class stuffDoer implements stuffShouldDo{
public function __construct(){
}
public function oneFunction(){
//Do stuff
//Method chaining
return $this;
}
public function anotherFunction(){
//last one in chain
}
}
$foo = new stuffDoer();
$foo->oneFunction()->anotherFunction();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment