改名
This commit is contained in:
@@ -53,7 +53,7 @@ class Command extends \Console\Command
|
|||||||
return 'shutdown success.';
|
return 'shutdown success.';
|
||||||
}
|
}
|
||||||
|
|
||||||
listen(Event::SERVER_BEFORE_START, [$this, 'scan_system_annotation']);
|
$this->scan_system_annotation();
|
||||||
|
|
||||||
return $manager->start();
|
return $manager->start();
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -187,10 +187,11 @@ class Event extends BaseObject
|
|||||||
* @param null $parameter
|
* @param null $parameter
|
||||||
* @param null $handler
|
* @param null $handler
|
||||||
* @param false $is_remove
|
* @param false $is_remove
|
||||||
* @return mixed
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function trigger($name, $parameter = null, $handler = null, $is_remove = false): mixed
|
public function trigger($name, $parameter = null, $handler = null, $is_remove = false): bool
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (!$this->exists($name)) {
|
if (!$this->exists($name)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -209,6 +210,9 @@ class Event extends BaseObject
|
|||||||
$this->offName($name);
|
$this->offName($name);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} catch (\Throwable $throwable) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user