CastToString
in package
implements
TypeCasting
FinalYes
Tags
Table of Contents
Interfaces
Properties
- $default : string|null
- $isNullable : bool
- $type : Type
- $variableName : TypeCastingInfo
Methods
- __construct() : mixed
- info() : TypeCastingInfo
- setOptions() : void
- Accepts additional parameters to configure the class Parameters should be scalar value, null or array containing only scalar value and null.
- toVariable() : TValue
- init() : Type, 1: bool}
Properties
$default
private
string|null
$default
= null
$isNullable read-only
private
bool
$isNullable
$type read-only
private
Type
$type
$variableName read-only
private
TypeCastingInfo
$variableName
Methods
__construct()
public
__construct(ReflectionProperty|ReflectionParameter $reflectionProperty) : mixed
Parameters
- $reflectionProperty : ReflectionProperty|ReflectionParameter
info()
public
info() : TypeCastingInfo
Return values
TypeCastingInfosetOptions()
Accepts additional parameters to configure the class Parameters should be scalar value, null or array containing only scalar value and null.
public
setOptions([string|null $default = null ][, bool $emptyStringAsNull = false ]) : void
Parameters
- $default : string|null = null
- $emptyStringAsNull : bool = false
toVariable()
public
toVariable(mixed $value) : TValue
Parameters
- $value : mixed
Tags
Return values
TValueinit()
private
init(ReflectionProperty|ReflectionParameter $reflectionProperty) : Type, 1: bool}
Parameters
- $reflectionProperty : ReflectionProperty|ReflectionParameter