首页 > 其他 > 详细

每天laravel-20160809| Container -12

时间:2016-05-18 10:57:49      阅读:166      评论:0      收藏:0      [点我收藏+]
   /**
    * 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

每天laravel-20160809| Container -12

原文:http://jingshanls.blog.51cto.com/3357095/1774600

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!