
$this->container['request'] instanceof Request 这段代码是什么操作?

$this->container['request'] instanceof Request 这段代码是什么操作?
|
airdgeAug 9, 2018
1
判断$this->container['request']是不是属于 Request 类
|
|
2
|
|
3
在群里收到的回复
1. 判断 IOC 中的对象的 class 是不是 Request 2. 应该是判断当前的 Request 实例,是不是 Dingo 的 Request。是就抛一个 Dingo 的验证异常,不是就抛 Laravel 的验证异常 搜索关键字: "PHP instanceof" 资料-详解 PHP 中 instanceof 关键字及 instanceof 关键字有什么作用: https://www.jb51.net/article/74409.htm |
|
4
很想抛出鸟哥语录
|
|
jowanAug 10, 2018
5
|
|
NEETLEEAug 10, 2018
6
instanceof 是一个判断变量类型的关键字啦,看懂了他,整句话的意思应该就很好理解了
|