Created
October 28, 2014 10:04
-
-
Save clemherreman/aacf19b7cfa2360f8289 to your computer and use it in GitHub Desktop.
This file contains 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 MyService { | |
private $finderFactory; | |
public function __construct(callable $finderFactory) | |
{ | |
$this->finderFactory = $finderFactory; | |
} | |
public function findStuff() | |
{ | |
$finder = $this->finderFactory(); | |
$finder->doStuff(); | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
won't work. I know it's just an example :)