您的位置:首页 > 编程语言 > PHP开发

每天laravel-20160809| Container -12

2016-05-18 09:47 483 查看
/**
* Get the rebound callbacks for a given type.
*
* @param  string  $abstract
* @return array
*/
protected function getReboundCallbacks($abstract)
{
if (isset($this->reboundCallbacks[$abstract])) {// if has the value in the reboundcallbacks array
return $this->reboundCallbacks[$abstract];// return it
}

return [];// return a null array
}// Get the rebound callbacks for a given type.

/**
* Wrap the given closure such that its dependencies will be injected when executed.
*
* @param  \Closure  $callback
* @param  array  $parameters
* @return \Closure
*/
public function wrap(Closure $callback, array $parameters = [])
{
return function () use ($callback, $parameters) {
return $this->call($callback, $parameters);// a waste
};
}// Wrap the given closure such that its
// set the given closure into the dependencies will be injected
// when it is executed we will fire the given closure


本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1774600
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: