class ViewWatcher extends Watcher

Traits

Properties

protected Dispatcher $events

The event dispatcher.

Methods

__construct(array $options = [])

Create a new watcher instance.

from  Watcher
void
register(Application $app)

Register the watcher.

setOptions(array $options)

Set the watcher options.

from  Watcher
array
hideParameters(array $data, array $hidden)

Hide the given parameters.

from  Watcher
string
formatClosureListener(Closure $listener)

Format a closure-based listener.

void
recordRenderedView(View $view)

Record a rendered view.

string
extractPath(View $view)

Extract the path from the given view.

array
extractKeysFromData(View $view)

Extract the keys from the given view in array form.

array
formatComposers(View $view)

Format the view's composers and creators.

getComposersForEvent(string $eventName)

Get all view composers for the given event.

bool
isWildcardViewComposer(array $variables, ReflectionFunction $closure)

Determine if the composer is wrapped for a wildcard event.

bool
isViewComposerClosure(ReflectionFunction $closure)

Determine if the closure is a class-based view composer.

Details

in Watcher at line 18
__construct(array $options = [])

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 31
void register(Application $app)

Register the watcher.

Parameters

Application $app

Return Value

void

in Watcher at line 31
Watcher setOptions(array $options)

Set the watcher options.

Parameters

array $options

Return Value

Watcher

in Watcher at line 41
protected array hideParameters(array $data, array $hidden)

Hide the given parameters.

Parameters

array $data
array $hidden

Return Value

array

in FormatsClosure at line 18
protected string formatClosureListener(Closure $listener)

Format a closure-based listener.

Parameters

Closure $listener

Return Value

string

Exceptions

ReflectionException

at line 42
void recordRenderedView(View $view)

Record a rendered view.

Parameters

View $view

Return Value

void

at line 59
protected string extractPath(View $view)

Extract the path from the given view.

Parameters

View $view

Return Value

string

at line 73
protected array extractKeysFromData(View $view)

Extract the keys from the given view in array form.

Parameters

View $view

Return Value

array

at line 83
protected array formatComposers(View $view)

Format the view's composers and creators.

Parameters

View $view

Return Value

array

at line 102
protected Collection getComposersForEvent(string $eventName)

Get all view composers for the given event.

Parameters

string $eventName

Return Value

Collection

at line 129
protected bool isWildcardViewComposer(array $variables, ReflectionFunction $closure)

Determine if the composer is wrapped for a wildcard event.

Parameters

array $variables
ReflectionFunction $closure

Return Value

bool

at line 137
protected bool isViewComposerClosure(ReflectionFunction $closure)

Determine if the closure is a class-based view composer.

Parameters

ReflectionFunction $closure

Return Value

bool