MergesProps
trait MergesProps
Properties
| protected bool | $merge | Indicates if the property should be merged. |
|
| protected bool | $deepMerge | Indicates if the property should be deep merged. |
|
| protected array<int, string> | $matchOn | The properties to match on for merging. |
|
| protected bool | $append | Indicates if the property values should be appended or prepended. |
|
| protected array<int, string> | $appendsAtPaths | The paths to append. |
|
| protected array<int, string> | $prependsAtPaths | The paths to prepend. |
Methods
Mark the property for merging. A live property cannot be merged, since refreshing it would append rather than replace its value.
Mark the property for deep merging.
Set the properties to match on for merging.
Determine if the property should be merged.
Determine if the property should be deep merged.
Get the properties to match on for merging.
Determine if the property should be appended at the root level.
Determine if the property should be prepended at the root level.
Determine if the property merges at the root level.
Specify that the value should be appended, optionally providing a key to append and a property to match on.
Specify that the value should be prepended, optionally providing a key to prepend and a property to match on.
Get the paths to append.
Get the paths to prepend.
Details
at line 52
MergesProps
merge()
Mark the property for merging. A live property cannot be merged, since refreshing it would append rather than replace its value.
at line 66
MergesProps
deepMerge()
Mark the property for deep merging.
at line 78
MergesProps
matchOn(string|array $matchOn)
Set the properties to match on for merging.
at line 88
bool
shouldMerge()
Determine if the property should be merged.
at line 96
bool
shouldDeepMerge()
Determine if the property should be deep merged.
at line 106
array
matchesOn()
Get the properties to match on for merging.
at line 114
bool
appendsAtRoot()
Determine if the property should be appended at the root level.
at line 122
bool
prependsAtRoot()
Determine if the property should be prepended at the root level.
at line 130
protected bool
mergesAtRoot()
Determine if the property merges at the root level.
at line 140
MergesProps
append(bool|string|array $path = true, string|null $matchOn = null)
Specify that the value should be appended, optionally providing a key to append and a property to match on.
at line 162
MergesProps
prepend(bool|string|array $path = true, string|null $matchOn = null)
Specify that the value should be prepended, optionally providing a key to prepend and a property to match on.
at line 184
array
appendsAtPaths()
Get the paths to append.
at line 194
array
prependsAtPaths()
Get the paths to prepend.