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

每天laravel-20160807| Container -10

2016-05-16 09:32 489 查看
/**
* 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息