AlterNormalizePropertyTrait
Table of Contents
Methods
- alterNormalizeProperty() : mixed
- Normalize a document property using configurable flags.
Methods
alterNormalizeProperty()
Normalize a document property using configurable flags.
public
alterNormalizeProperty(mixed $value[, array<string|int, mixed> $definition = [] ][, bool &$modified = false ]) : mixed
The normalization can be customized via the $definition array:
- If empty or no flags provided, uses CleanFlag::DEFAULT | CleanFlag::RETURN_NULL
- If a flags value is provided at index 0, uses that instead
Parameters
- $value : mixed
-
The value to normalize
- $definition : array<string|int, mixed> = []
-
Optional flags array: [CleanFlag value, ...other params]
- $modified : bool = false
-
Reference flag indicating if the value was modified
Tags
Return values
mixed —The normalized value, or null if cleaned away