PHP Class Xpressengine\Support\Caster

Author: XE Developers ([email protected])
Datei anzeigen Open project: xpressengine/xpressengine Class Usage Examples

Public Methods

Method Description
cast ( mixed $value ) : mixed To cast a value

Protected Methods

Method Description
castBool ( mixed $v ) : boolean | null To boolean cast a value
castFloat ( mixed $v ) : float | null To float cast a value
castInt ( mixed $v ) : integer | null To Integer cast a value

Method Details

cast() public static method

To cast a value
public static cast ( mixed $value ) : mixed
$value mixed original value
return mixed

castBool() protected static method

To boolean cast a value
protected static castBool ( mixed $v ) : boolean | null
$v mixed original value
return boolean | null

castFloat() protected static method

To float cast a value
protected static castFloat ( mixed $v ) : float | null
$v mixed original value
return float | null

castInt() protected static method

To Integer cast a value
protected static castInt ( mixed $v ) : integer | null
$v mixed original value
return integer | null