Blogger Information
Blog 142
fans 5
comment 0
visits 130496
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
通过观察者和静态方法定义的监听器
php开发大牛
Original
544 people have browsed it

if ($result === false) {
  return false;
 }

 return ! empty($result) ? $result : static::$dispatcher->{$method}(
  "eloquent.{$event}: ".static::class, $this
 );

这里会先判断$events定义的监听器是否返回false以及返回值是否为空,如果为false则直接结束事件,如果返回不为false而且为空的话,会再去触发通过观察者和静态方法定义的监听器,并且把监听器的返回值返回。
完。


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post