Pheasant\Database\Binder::sqlValue PHP Method

sqlValue() public method

Intelligently quotes/escapes based on the provided type. If an object is passed with a toSql() method, that is used, otherwise the php type is used to infer what needs escaping.
public sqlValue ( $mixed ) : string
return string
    public function sqlValue($mixed)
    {
        if (is_object($mixed) && method_exists($mixed, 'toSql')) {
            return $mixed->toSql($this);
        }
        return $this->quote($this->escape($mixed));
    }