BuiltinTypeCast
class BuiltinTypeCast implements Cast, IterableItemCast
Methods
__construct(string $type)
Create a built-in type cast.
mixed
cast(DataProperty $property, mixed $value, array $properties, CreationContext $context)
Cast a property value to the configured built-in type.
mixed
castIterableItem(DataProperty $property, mixed $value, array $properties, 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 18
__construct(string $type)
Create a built-in type cast.
at line 26
mixed
cast(DataProperty $property, mixed $value, array $properties, CreationContext $context)
Cast a property value to the configured built-in type.
at line 38
mixed
castIterableItem(DataProperty $property, mixed $value, array $properties, CreationContext $context)
Cast an iterable item to the configured built-in type.
at line 50
protected mixed
runCast(mixed $value)
Cast one value to the configured type.