trait HasState (View source)

Properties

protected string|null $statePath
protected string $cachedAbsoluteStatePath

Methods

void
callAfterStateHydrated()

No description

bool
callAfterStateUpdated(string $path)

No description

void
callBeforeStateDehydrated()

No description

array
dehydrateState(array $state = [], bool $isDehydrated = true)

No description

array
mutateDehydratedState(array $state = [])

No description

array
mutateStateForValidation(array $state = [])

No description

fill(array|null $state = null, bool $andCallHydrationHooks = true, bool $andFillStateWithNull = true)

No description

void
hydrateState(array|null $hydratedDefaultState, bool $andCallHydrationHooks = true)

No description

void
fillStateWithNull()

No description

statePath(string|null $path)

No description

array
getState(bool $shouldCallHooksBefore = true, Closure|null $afterValidate = null)

No description

Arrayable
getRawState()

No description

array
getStateOnly(array $keys, bool $shouldCallHooksBefore = true)

No description

array
getStateExcept(array $keys, bool $shouldCallHooksBefore = true)

No description

string
getStatePath(bool $isAbsolute = true)

No description

void
flushCachedAbsoluteStatePath()

No description

Details

void callAfterStateHydrated()

No description

Return Value

void

bool callAfterStateUpdated(string $path)

No description

Parameters

string $path

Return Value

bool

void callBeforeStateDehydrated()

No description

Return Value

void

array dehydrateState(array $state = [], bool $isDehydrated = true)

No description

Parameters

array $state
bool $isDehydrated

Return Value

array

array mutateDehydratedState(array $state = [])

No description

Parameters

array $state

Return Value

array

array mutateStateForValidation(array $state = [])

No description

Parameters

array $state

Return Value

array

HasState fill(array|null $state = null, bool $andCallHydrationHooks = true, bool $andFillStateWithNull = true)

No description

Parameters

array|null $state
bool $andCallHydrationHooks
bool $andFillStateWithNull

Return Value

HasState

void hydrateState(array|null $hydratedDefaultState, bool $andCallHydrationHooks = true)

No description

Parameters

array|null $hydratedDefaultState
bool $andCallHydrationHooks

Return Value

void

void fillStateWithNull()

No description

Return Value

void

HasState statePath(string|null $path)

No description

Parameters

string|null $path

Return Value

HasState

array getState(bool $shouldCallHooksBefore = true, Closure|null $afterValidate = null)

No description

Parameters

bool $shouldCallHooksBefore
Closure|null $afterValidate

Return Value

array

Arrayable getRawState()

No description

Return Value

Arrayable

| Arrayable

array getStateOnly(array $keys, bool $shouldCallHooksBefore = true)

No description

Parameters

array $keys
bool $shouldCallHooksBefore

Return Value

array

array getStateExcept(array $keys, bool $shouldCallHooksBefore = true)

No description

Parameters

array $keys
bool $shouldCallHooksBefore

Return Value

array

string getStatePath(bool $isAbsolute = true)

No description

Parameters

bool $isAbsolute

Return Value

string

protected void flushCachedAbsoluteStatePath()

No description

Return Value

void