ModelWatcher
class ModelWatcher extends Watcher
Constants
| HYDRATIONS_CONTEXT_KEY |
|
Methods
void
void
recordAction(string $event, array $data)
Record an action.
array
getHydrations()
Get all hydration entries.
IncomingEntry|null
getHydration(string $modelClass)
Get a hydration entry for the given model class.
void
updateHydration(string $modelClass, IncomingEntry $entry)
Update the hydration entry for the given model class.
void
void
flushHydrations()
Flush the cached entries.
Details
in
Watcher at line 16
__construct(array $options = [])
Create a new watcher instance.
at line 25
void
register(Application $app)
Register the watcher.
at line 41
void
recordAction(string $event, array $data)
Record an action.
at line 81
array
getHydrations()
Get all hydration entries.
at line 89
IncomingEntry|null
getHydration(string $modelClass)
Get a hydration entry for the given model class.
at line 97
void
updateHydration(string $modelClass, IncomingEntry $entry)
Update the hydration entry for the given model class.
at line 110
void
recordHydrations(Model $data)
Record model hydrations.
at line 142
void
flushHydrations()
Flush the cached entries.