public function cast($value)
    {
        $fn = 'cast' . ucfirst(gettype($value));
        
        return method_exists($this, $fn) ? $this->$fn($value) : (boolean)$value;
    }
public function cast($value)
    {
        $fn = 'cast' . ucfirst(gettype($value));
        
        return method_exists($this, $fn) ? $this->$fn($value) : (boolean)$value;
    }
public function cast ( $ value ) { $ fn = 'cast' . ucfirst ( gettype ( $ value ) ) ; return method_exists ( $ this , $ fn ) ? $ this -> $ fn ( $ value ) : ( boolean ) $ value ; }
Cast value to a boolean

@param mixed $value
@return boolean|mixed
Cast value to a boolean