BuiltinTypeCast
class BuiltinTypeCast implements Cast, IterableItemCast
Methods
__construct(string $type)
Create a built-in type cast.
mixed
cast(DataProperty $property, mixed $value, ConstructionState $state, CreationContext $context)
Cast a property value to the configured built-in type.
mixed
castIterableItem(DataProperty $property, mixed $value, ConstructionState $state, CreationContext $context)
Cast an iterable item to the configured built-in type.
mixed
runCast(mixed $value)
Cast one value to the configured type.
Details
at line 19
__construct(string $type)
Create a built-in type cast.
at line 27
mixed
cast(DataProperty $property, mixed $value, ConstructionState $state, CreationContext $context)
Cast a property value to the configured built-in type.
at line 39
mixed
castIterableItem(DataProperty $property, mixed $value, ConstructionState $state, CreationContext $context)
Cast an iterable item to the configured built-in type.
at line 51
protected mixed
runCast(mixed $value)
Cast one value to the configured type.