DataConfig
class DataConfig
Properties
| non-empty-list<string> | $dateFormats | The accepted date formats in declaration order. |
|
| string|null | $dateTimezone | The timezone applied while casting and transforming dates. |
|
| ValidationStrategy | $validationStrategy | The default validation strategy. |
|
| null|NameMapper> | $inputNameMapper | The default input name mapper. |
|
| null|NameMapper> | $outputNameMapper | The default output name mapper. |
|
| Cast>> | $casts | The configured cast overrides. |
|
| Transformer>> | $transformers | The configured transformer overrides. |
|
| Normalizer>> | $normalizers | The configured global normalizers. |
|
| string|null | $wrap | The default resource wrapper. |
|
| int|null | $maxTransformationDepth | The maximum nested transformation depth. |
|
| protected BaseData>> | $morphMap | ||
| protected BaseData>, string> | $reversedMorphMap |
Methods
Register the enforced data morph map.
Get the data class registered for a morph alias.
Get the morph alias registered for a data class.
Details
at line 89
__construct(Repository $config)
Create a new data configuration.
at line 122
void
enforceMorphMap(array $map)
Register the enforced data morph map.
Boot-only. The aliases persist on the worker-lifetime configuration and affect every subsequent data cast in the worker.
at line 169
string|null
getMorphedDataClass(string $alias)
Get the data class registered for a morph alias.
at line 179
string|null
getDataClassAlias(string $class)
Get the morph alias registered for a data class.