Skip to content

Instantly share code, notes, and snippets.

@TheOpenDevProject
Created November 5, 2015 03:09
Show Gist options
  • Select an option

  • Save TheOpenDevProject/1d0f9141252d2998932b to your computer and use it in GitHub Desktop.

Select an option

Save TheOpenDevProject/1d0f9141252d2998932b to your computer and use it in GitHub Desktop.
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