source/Core/Database/Adapter/Doctrine/Database.php
public function quote($value)
    {
        try {
            $result = $this->getConnection()->quote($value);
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $result;
    }
public function quote($value)
    {
        try {
            $result = $this->getConnection()->quote($value);
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $result;
    }
public function quote ( $ value ) { try { $ result = $ this -> getConnection ( ) -> quote ( $ value ) ; } catch ( DBALException $ exception ) { $ exception = $ this -> convertException ( $ exception ) ; $ this -> handleException ( $ exception ) ; } catch ( PDOException $ exception ) { $ exception = $ this -> convertException ( $ exception ) ; $ this -> handleException ( $ exception ) ; } return $ result ; }
Quote a string or a numeric value in a way, that it might be used as a value in a sql statement.
Returns false for values that cannot be quoted.

NOTE: It is not safe to use the return value of this function in a query. There will be no risk of SQL injection,
but when the statement is executed and the value could not have been quoted, a DatabaseException is thrown.
You are strongly encouraged to always use prepared statements instead of quoting the values on your own.
E.g. use
$resultSet = DatabaseProvider::getDb->select(
'SELECT * FROM ´mytable´ WHERE ´id´ = ? OR ´id´ = ?',
array($id1, $id2)
);
instead of
$resultSet = DatabaseProvider::getDb->select(
'SELECT * FROM ´mytable´ WHERE ´id´ = ' . DatabaseProvider::getDb->quote($id1) . ' OR ´id´ = ' . DatabaseProvider::getDb->quote($id1)
);

@param mixed $value The string or numeric value to be quoted.

@return false|string The given string or numeric value converted to a string surrounded by single quotes or set to false, if the value could not have been quoted.
Quote a string or a numeric value in a way that it might be used as a value in a sql statement . Returns false for values that cannot be quoted .