(non-PHPdoc)
@see PDO::quote()
330827
public function quote($string, $parameter_type = PDO::PARAM_STR) {
		if ($parameter_type != PDO::PARAM_STR) {
			throw new Exception('Use prepare() and bind parameters');
		}
		else {
			return "'" . str_replace("'", "''", $string) . "'";
		}
	}
1374713
static function quoteIfNeeded( $value )
    {
        $quote = '';
        if ( strpos( $value, ' ' ) !== false )
        {
            $quote = '"';
            if ( strpos( trim( $value ), '(' ) === 0 )
            {
                $quote = '';
            }
        }
        return $quote . $value . $quote;
    }
249468
public function quoteIfNecessary($value)
    {
        if ($this->isNumber($value) || $this->isPlaceholder($value)) {
            return $value;
        }

        return $this->quote($value);
    }
447983
public final function quote($value, $paramType = \PDO::PARAM_STR)
    {
        //łączy jeśli niepołączony
        if (!$this->_connected) {
            $this->connect();
        }
        //dla szczególnych typów: null int i bool nie opakowuje
        switch (gettype($value)) {
            case 'NULL':
                return 'NULL';
            case 'integer':
                return intval($value);
            case 'boolean':
                return $value ? 'true' : 'false';
        }
        //quote z PDO
        return $this->_downstreamPdo->quote($value, $paramType);
    }
484661
public function quoteField(string $input): string
    {
        $input = $this->unquoteField($input);

        // nope.. quote all
        // if (ctype_lower($input)) {
        //     return $input;
        // }

        if ($this->isMysql()) {
            return '`'. str_replace('`', '``', $input) .'`';
        } elseif ($this->isPgsql()) {
            return '"'. str_replace('"', '""', $input) .'"';
        }
    }
1282555
public function quote($value)
    {
        if ($value === null) {
            return 'NULL';
        }
        if ($value instanceof DateTimeInterface) {
            return $this->pdo->quote($value->format('Y-m-d H:i:s'));
        }
        if (is_array($value)) {
            return implode(',', array_map([$this, 'quote'], $value));
        }
        if (is_bool($value)) {
            return $this->pdo->quote($value ? 1 : 0);
        }

        return $this->pdo->quote($value);
    }
224754
private function quote($target)
    {
        $wrapper = function($column) {
            return sprintf('`%s`', $column);
        };

        if (is_array($target)) {
            foreach($target as &$column) {
                $column = $this->needsQuoting($column) ? $wrapper($column) : $column;
            }

        } else if (is_scalar($target)) {
            $target = $this->needsQuoting($target) ? $wrapper($target) : $target;

        } else {
            throw new InvalidArgumentException(sprintf(
                'Unknown type for wrapping supplied "%s"', gettype($target)
            ));
        }

        return $target;
    }
108497
protected function _quoteValue($value)
    {
        if(is_numeric($value)) {
            return false;
        }

        if(strpos($value, $this->separator) !== false) { // Separator is present in field
            return true;
        }

        if(strpos($value, $this->quote) !== false) { // Quote character is present in field
            return true;
        }

        if (strpos($value, "\n") !== false || strpos($value, "\r") !== false ) { // Newline is present in field
            return true;
        }

        if(substr($value, 0, 1) == " " || substr($value, -1) == " ") {  // Space found at beginning or end of field value
            return true;
        }

        return false;
    }
720267
protected function quote($value)
	{
		//if string, quote and return
		if ( is_string($value) || is_int($value) )  
		{
			//call connector method to escape string
			$escaped = $this->connector->escape($value);

			//return escaped string
			return "'{$escaped}'";

		}

		//if input is array, loop through values escaping
		elseif ( is_array($value) ) 
		{
			//define array to contain new quoted values
			$buffer = array();

			//loop through the array one item at a time
			foreach ($value as $i) 
			{
				//quote string and add to the $buffer array container
				array_push($buffer,$this->quote($i));

				//join the array elements to form one string
				$buffer = join(", ", $buffer);

				//quote new string, put in parenthesis and return
				return "({$buffer})";

			}

		}

		//return null if null value was passed
		elseif ( is_null($value) ) 
		{
			//return null as string
			return 'NULL';

		}

		//if boolean, return interger value of boolean
		elseif ( is_bool($value) ) 
		{
			//get interger value and return
			return (int)$value;

		}

		//check if empty value was returned
		elseif ( empty($value) ) 
		{
			//return empty string
			return "' '";

		}

		//if input value does not fall among any of these, escape and return output
		else return $this->connector->escape($value);

	}
1232451
protected function _quoteUpdate($query)
    {
        $table = $query->clause('update')[0];

        if (is_string($table)) {
            $query->update($this->_driver->quoteIdentifier($table));
        }
    }
441020
protected function quote_escaped()
	{
		$this->value .= $this->data[$this->position];
		$this->position++;
		$this->state = 'quote';
	}
206866
public function quoteValue($value): string
    {
        if ($value === null) {
            return 'NULL';
        }

        $result = $this->pdo->quote($value);

        if ($result === false) {
            throw new RuntimeException('The database driver does not support quoting in this way.');
        }

        return $result;
    }
677571
function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes;

    $total_weight_units = $shipping_weight;
    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                   (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));


    if ($this->tax_class > 0) {
      $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    }

    if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);

    return $this->quotes;
  }
41562
private function quoteValue($value)
    {
        if (is_numeric($value)) {
            return $value;
        }

        if ($value === null) {
            return 'null';
        }

        return $this->getConnection()->quote($value);
    }
1732
public function quote($string, $parameter_type = \PDO::PARAM_STR): string {
        return $this->connection->quote($string, $parameter_type);
    }
251514
def quote(query):
    ''''''
    if query.startswith('\'') is not True:
        query = '\'' + query

    if query.endswith('\'') is not True:
        query = query + '\''

    return query
1309292
public function escape($val) {
		if($this->db === null) $this->connect();
		return $this->db->quote($val);
	}