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
classFromFile(SplFileInfo $file, string $basePath)

Extract the class name from the given file path.

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.

Parameters

array|string $listenerPath
string $basePath

Return Value

array

at line 64
static protected array getListenerEvents(iterable $listeners, string $basePath)

Get all of the listeners and their corresponding events.

Parameters

iterable $listeners
string $basePath

Return Value

array

at line 107
static protected string classFromFile(SplFileInfo $file, string $basePath)

Extract the class name from the given file path.

Parameters

SplFileInfo $file
string $basePath

Return Value

string

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.

Parameters

callable $callback

Return Value

void

at line 138
static void flushState()

Flush all static state.

Return Value

void