Skip to content

Instantly share code, notes, and snippets.

@davedevelopment
Last active December 14, 2015 14:18
Show Gist options
  • Save davedevelopment/5099747 to your computer and use it in GitHub Desktop.
Save davedevelopment/5099747 to your computer and use it in GitHub Desktop.
Partial application of call_user_func_array with pimple
<?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