Last active
January 28, 2016 05:02
-
-
Save TheOpenDevProject/ebfbdc1b91eb89f4161a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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