Last active
December 14, 2015 14:18
-
-
Save davedevelopment/5099747 to your computer and use it in GitHub Desktop.
Partial application of call_user_func_array with pimple
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 | |
function lazyProxyFactoryMethodFunctionPartialApplicationOfPimple($app, $id, $method) | |
{ | |
return function() { | |
return call_user_func_array(array($app[$id], $method), func_get_args()); | |
} | |
} | |
// test for diff | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment