DiscoverEvents
class DiscoverEvents
Properties
| static null|SplFileInfo, string): class-string | $guessClassNamesUsingCallback | The callback to be used to guess class names. |
Methods
static array
within(array|string $listenerPath, string $basePath)
Get all of the events and listeners by searching the given listener directory.
static array
getListenerEvents(iterable $listeners, string $basePath)
Get all of the listeners and their corresponding events.
static string
static void
guessClassNamesUsing(callable $callback)
Specify a callback to be used to guess class names.
static void
flushState()
Flush all static state.
Details
at line 32
static array
within(array|string $listenerPath, string $basePath)
Get all of the events and listeners by searching the given listener directory.
at line 64
static protected array
getListenerEvents(iterable $listeners, string $basePath)
Get all of the listeners and their corresponding events.
at line 107
static protected string
classFromFile(SplFileInfo $file, string $basePath)
Extract the class name from the given file path.
at line 130
static void
guessClassNamesUsing(callable $callback)
Specify a callback to be used to guess class names.
Boot-only. The callback persists in a static property used during event discovery; runtime use has no effect on already-discovered listeners.
at line 138
static void
flushState()
Flush all static state.