src/Database/Database.php
protected function public__quoteValue($str)
    {
        if (\is_int($str) || \is_float($str))
        {
            return $str;
        }
        $connection_already_opened = FALSE;
        $pdo = $this->getPDOInstance();
        if ($pdo == NULL)
        {
            $this->open();
        }
        else
        {
            $connection_already_opened = TRUE;
        }
        if (($value = $pdo->quote($str)) !== FALSE)
        {
            if ($pdo != NULL && !$connection_already_opened)
            {
                $this->close();
            }
            return $value;
        }
        else
        { // the driver doesn't support quote (e.g. oci)
            if ($pdo != NULL && !$connection_already_opened)
            {
                $this->close();
            }
            return "'" . \addcslashes(\str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
        }
    }
protected function public__quoteValue($str)
    {
        if (\is_int($str) || \is_float($str))
        {
            return $str;
        }
        $connection_already_opened = FALSE;
        $pdo = $this->getPDOInstance();
        if ($pdo == NULL)
        {
            $this->open();
        }
        else
        {
            $connection_already_opened = TRUE;
        }
        if (($value = $pdo->quote($str)) !== FALSE)
        {
            if ($pdo != NULL && !$connection_already_opened)
            {
                $this->close();
            }
            return $value;
        }
        else
        { // the driver doesn't support quote (e.g. oci)
            if ($pdo != NULL && !$connection_already_opened)
            {
                $this->close();
            }
            return "'" . \addcslashes(\str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
        }
    }
Quotes a string value for use in a query.

@param string $str string to be quoted
@return string the properly quoted string
@see http://www.php.net/manual/en/function.PDO-quote.php