Home  >  Article  >  Backend Development  >  laravel框架里一段代码关于use的疑问

laravel框架里一段代码关于use的疑问

WBOY
WBOYOriginal
2016-06-06 20:28:321215browse

laravel5 代码位于vendor\laravel\framework\src\Illuminate\Container\Container.php
不清楚这里的use有什么用,也想了解use会在什么场景用到。
laravel框架里一段代码关于use的疑问

回复内容:

laravel5 代码位于vendor\laravel\framework\src\Illuminate\Container\Container.php
不清楚这里的use有什么用,也想了解use会在什么场景用到。
laravel框架里一段代码关于use的疑问

http://php.net/manual/zh/functions.anonymous.php

对啊 这就是匿名函数噻 . 你不知道依赖注入吗 ? 这是容器提供的 工厂方法

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn