class DiscoverEvents (View source)

Properties

static SplFileInfo, string): string|null $guessClassNamesUsingCallback

The callback to be used to guess class names.

Methods

static array
within(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.

Details

static array within(string $listenerPath, string $basePath)

Get all of the events and listeners by searching the given listener directory.

Parameters

string $listenerPath
string $basePath

Return Value

array

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

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

static void guessClassNamesUsing(callable $callback)

Specify a callback to be used to guess class names.

Parameters

callable $callback

Return Value

void

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.