[EVENT] Rename event names to camel case to make finding handlers easier

This commit is contained in:
Hugo Sales
2020-10-19 18:22:59 +00:00
committed by Hugo Sales
parent 0b759da780
commit 1949e0b987
6 changed files with 8 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ class ModuleManager
F\map(F\select(get_class_methods($obj),
F\ary(F\partial_right('App\Util\Formatting::startsWith', 'on'), 1)),
function (string $m) use ($obj) {
$ev = Formatting::camelCaseToSnakeCase(substr($m, 2));
$ev = substr($m, 2);
$this->events[$ev] = $this->events[$ev] ?? [];
$this->events[$ev][] = [$obj, $m];
}