首页 > 其他 > 详细

每天laravel-20160731| Container -3

时间:2016-05-05 11:12:47      阅读:159      评论:0      收藏:0      [点我收藏+]
/**
 * Determine if the given abstract type has been resolved.
 *
 * @param  string  $abstract
 * @return bool
 */
public function resolved($abstract)
{// a resolved person
    $abstract = $this->normalize($abstract);// get a normal namespace

    if ($this->isAlias($abstract)) {// check it is a alias
        $abstract = $this->getAlias($abstract);// get the alias function name
    }

    return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]);
}//Determine if the given abstract type has been resolved.

/**
 * Determine if a given string is an alias.
 *
 * @param  string  $name
 * @return bool
 */
public function isAlias($name)
{
    return isset($this->aliases[$this->normalize($name)]);// return true or false ,determine the aliases array for the
}// check like determine , so wo need get a string that is function should be see as a alias


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

每天laravel-20160731| Container -3

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

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