Created
November 5, 2015 03:09
-
-
Save TheOpenDevProject/1d0f9141252d2998932b 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
| class MyClass{ | |
| protected $_someMember; | |
| //Factory Method | |
| public static function MyClass::New(){ | |
| return new MyClass(); | |
| } | |
| public function Example(){ | |
| $clojure = function(){ | |
| //Inner stuff | |
| }; | |
| } | |
| private function internalMethod($foo,$callback){ | |
| } | |
| public function __construct(){ | |
| } | |
| }; | |
| $inst = MyClass::New(); | |
| $inst->internalMethod("LOL",function(){ | |
| //internal callback | |
| return "FUN"; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment