CastValueInterface
API reference › Model › CastValueInterface
Contract for custom value casters used by #[Cast].
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
cast() abstract | Casts the incoming value into a target representation. | CastValueInterface |
Method details
Section titled “Method details”cast()
Section titled “cast() ”abstract public function cast(mixed $value): mixedCasts the incoming value into a target representation.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed |
Returns
mixed