Converts string over to native php data types.

package Cactus
author Dave Widmer

 Methods

Converts a string value to boolean.

boolean(string $value) : boolean

Parameters

$value

string

A 0 or 1 as a string

Returns

boolean

Converts a string date to a DateTime object.

date(string $value) : \DateTime

Parameters

$value

string

A Y-m-d date as a string

Returns

Converts a string date to a DateTime object.

dateTime(string $value) : \DateTime

Parameters

$value

string

A Y-m-d H:i:s date as a string

Returns

Converts a string float value to a real float.

float(string $value) : float

Parameters

$value

string

The float value as a string

Returns

float

Converts a string integer value to a real integer.

integer(string $value) : float

Parameters

$value

string

The integer value as a string

Returns

float

Converts a string to a "string"?

string(string $value) : string

Parameters

$value

string

The string value

Returns

string

Converts a string time to a DateTime object.

time(string $value) : \DateTime

Parameters

$value

string

A H:i:s time as a string

Returns