class PageController extends Controller

Traits

AuthorizesRequests
DispatchesJobs
ValidatesRequests

Properties

protected array $routes Additional Netflex page routes from  BaseController
protected array $dispatchesEvents The event map. from  HasEvents
protected array $observables User exposed observable events. from  HasEvents
static Dispatcher $dispatcher Event dispatcher instance from  HasEvents
static protected array $traitInitializers The array of trait initializers that will be called on each new instance. from  HasEvents
static protected array $booted The array of booted instances. from  HasEvents

Methods

getRoutes()

No description

Response
fallbackIndex()

No description

void
bootIfNotBooted()

Check if we needs to be booted and if so, do it.

static void
boot()

Bootstrap traits.

static void
bootTraits()

Boot all of the bootable traits.

void
initializeTraits()

Initialize any initializable traits.

static void
observe(object|array|string $classes)

Register observers.

void
registerObserver(object|string $class)

Register a single observer.

array
getObservableEvents()

Get the observable event names.

$this
setObservableEvents(array $observables)

Set the observable event names.

void
addObservableEvents(array|mixed $observables)

Add an observable event name.

void
removeObservableEvents(array|mixed $observables)

Remove an observable event name.

static void
registerEvent(string $event, Closure|string $callback)

Register a event with the dispatcher.

mixed
fireEvent(string $event, bool $halt = true)

Fire the given event.

mixed|null
fireCustomEvent(string $event, string $method)

Fire a custom event for the given event.

mixed
filterEventResults(mixed $result)

Filter the event results.

static void
flushEventListeners()

Remove all of the event listeners.

static Dispatcher
getEventDispatcher()

Get the event dispatcher instance.

static void
setEventDispatcher(Dispatcher $dispatcher)

Set the event dispatcher instance.

static void
unsetEventDispatcher()

Unset the event dispatcher.

static mixed
withoutEvents(callable $callback)

Execute a callback without firing any events.

__construct()

No description

static void
booting(Closure|string $callback)

Register an updated model event with the dispatcher.

static void
booted(Closure|string $callback)

Register an updated model event with the dispatcher.

Details

in BaseController at line 28
getRoutes()

in BaseController at line 92
Response fallbackIndex()

Return Value

Response

in HasEvents at line 56
protected void bootIfNotBooted()

Check if we needs to be booted and if so, do it.

Return Value

void

in HasEvents at line 73
static protected void boot()

Bootstrap traits.

Return Value

void

in HasEvents at line 83
static protected void bootTraits()

Boot all of the bootable traits.

Return Value

void

in HasEvents at line 108
protected void initializeTraits()

Initialize any initializable traits.

Return Value

void

in HasEvents at line 123
static void observe(object|array|string $classes)

Register observers.

Parameters

object|array|string $classes

Return Value

void

Exceptions

RuntimeException

in HasEvents at line 140
protected void registerObserver(object|string $class)

Register a single observer.

Parameters

object|string $class

Return Value

void

Exceptions

RuntimeException

in HasEvents at line 180
array getObservableEvents()

Get the observable event names.

Return Value

array

in HasEvents at line 197
$this setObservableEvents(array $observables)

Set the observable event names.

Parameters

array $observables

Return Value

$this

in HasEvents at line 210
void addObservableEvents(array|mixed $observables)

Add an observable event name.

Parameters

array|mixed $observables

Return Value

void

in HasEvents at line 224
void removeObservableEvents(array|mixed $observables)

Remove an observable event name.

Parameters

array|mixed $observables

Return Value

void

in HasEvents at line 239
static protected void registerEvent(string $event, Closure|string $callback)

Register a event with the dispatcher.

Parameters

string $event
Closure|string $callback

Return Value

void

in HasEvents at line 255
protected mixed fireEvent(string $event, bool $halt = true)

Fire the given event.

Parameters

string $event
bool $halt

Return Value

mixed

in HasEvents at line 287
protected mixed|null fireCustomEvent(string $event, string $method)

Fire a custom event for the given event.

Parameters

string $event
string $method

Return Value

mixed|null

in HasEvents at line 306
protected mixed filterEventResults(mixed $result)

Filter the event results.

Parameters

mixed $result

Return Value

mixed

in HasEvents at line 322
static void flushEventListeners()

Remove all of the event listeners.

Return Value

void

in HasEvents at line 344
static Dispatcher getEventDispatcher()

Get the event dispatcher instance.

Return Value

Dispatcher

in HasEvents at line 355
static void setEventDispatcher(Dispatcher $dispatcher)

Set the event dispatcher instance.

Parameters

Dispatcher $dispatcher

Return Value

void

in HasEvents at line 365
static void unsetEventDispatcher()

Unset the event dispatcher.

Return Value

void

in HasEvents at line 376
static mixed withoutEvents(callable $callback)

Execute a callback without firing any events.

Parameters

callable $callback

Return Value

mixed

in Controller at line 12
__construct()

in Controller at line 24
static void booting(Closure|string $callback)

Register an updated model event with the dispatcher.

Parameters

Closure|string $callback

Return Value

void

in Controller at line 35
static void booted(Closure|string $callback)

Register an updated model event with the dispatcher.

Parameters

Closure|string $callback

Return Value

void