首页 > 其他 > 详细

每天laravel-20160807| Container -10

时间:2016-05-16 11:13:16      阅读:235      评论:0      收藏:0      [点我收藏+]
   /**
    * Alias a type to a different name.
    *
    * @param  string  $abstract
    * @param  string  $alias
    * @return void
    */
   public function alias($abstract, $alias)
   {
       $this->aliases[$alias] = $this->normalize($abstract);// i know this ,set the alias as a key , abstract function as a value.
   }// a easy function that to set a alias for a different name

   /**
    * Extract the type and alias from a given definition.
    *
    * @param  array  $definition
    * @return array
    */
   protected function extractAlias(array $definition)
   {
       return [key($definition), current($definition)];
   }// function ‘key‘ is get the current key.
// function ‘current‘ is get the current value,
// so that means to get the current array


本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1773785

每天laravel-20160807| Container -10

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

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