public function wrap($function=null, $wrapper=null) {
    list($function, $wrapper) = self::_wrapArgs(func_get_args(), 2);
    
    return self::_wrap(function() use ($wrapper, $function) {
      $args = array_merge(array($function), func_get_args());
      return call_user_func_array($wrapper, $args);
    });
  }
public function wrap($function=null, $wrapper=null) {
    list($function, $wrapper) = self::_wrapArgs(func_get_args(), 2);
    
    return self::_wrap(function() use ($wrapper, $function) {
      $args = array_merge(array($function), func_get_args());
      return call_user_func_array($wrapper, $args);
    });
  }
public function wrap ( $ function = null , $ wrapper = null ) { list ( $ function , $ wrapper ) = self :: _wrapArgs ( func_get_args ( ) , 2 ) ; return self :: _wrap ( function ( ) use ( $ wrapper , $ function ) { $ args = array_merge ( array ( $ function ) , func_get_args ( ) ) ; return call_user_func_array ( $ wrapper , $ args ) ; } ) ; }
Wraps the function inside the wrapper function, passing it as the first argument
Wraps the function inside the wrapper function passing it as the first argument