class Caster

폼에 의해 전달받은 값은 모두 string 인데 이러한 값들을 원래 타입에 맞게 형변환 해주는 역할을 함

Methods

static mixed
cast(mixed $value)

To cast a value

static bool|null
castBool(mixed $v)

To boolean cast a value

static int|null
castInt(mixed $v)

To Integer cast a value

static float|null
castFloat(mixed $v)

To float cast a value

Details

at line 36
static mixed cast(mixed $value)

To cast a value

Parameters

mixed $value original value

Return Value

mixed

at line 64
static protected bool|null castBool(mixed $v)

To boolean cast a value

Parameters

mixed $v original value

Return Value

bool|null

at line 81
static protected int|null castInt(mixed $v)

To Integer cast a value

Parameters

mixed $v original value

Return Value

int|null

at line 92
static protected float|null castFloat(mixed $v)

To float cast a value

Parameters

mixed $v original value

Return Value

float|null