Quotes identifier based on $this->isIdentifierQuotingEnabled() and $tableMap->isIdentifierQuotingEnabled.

@param string $string
@return string
439507
public function quoteIdentifier($string, $tableName = '')
    {
        if ($this->isIdentifierQuotingEnabled()) {
            $adapter = Propel::getServiceContainer()->getAdapter($this->getDbName());

            return $adapter->quote($string);
        }

        //find table name and ask tableMap if quoting is enabled
        if (!$tableName && false !== ($pos = strrpos($string, '.'))) {
            $tableName = substr($string, 0, $pos);
        }

        $tableMapName = $this->getTableForAlias($tableName) ?: $tableName;

        if ($tableMapName) {
            $dbMap = Propel::getServiceContainer()->getDatabaseMap($this->getDbName());
            if ($dbMap->hasTable($tableMapName)) {
                $tableMap = $dbMap->getTable($tableMapName);
                if ($tableMap->isIdentifierQuotingEnabled()) {
                    $adapter = Propel::getServiceContainer()->getAdapter($this->getDbName());

                    return $adapter->quote($string);
                }
            }
        }

        return $string;
    }
969762
public function quoteIdentifier(string $identifier): string
    {
        // switch statement for DB type
        switch ($this->connect['type']) {
            case 'mysql':
                return '`' . str_replace('`', '``', $identifier) . '`';
            case 'postgresql':
            case 'sqlite':
            default:
                return '"' . str_replace('"', '\\' . '"', $identifier) . '"';
        }
    }
900466
public static function decodeHtmlEntities($string)
  {
    // Entities-replacements
    $entities = array ("'&(quot|#34);'i",
                        "'&(amp|#38);'i",
                        "'&(lt|#60);'i",
                        "'&(gt|#62);'i",
                        "'&(nbsp|#160);'i",
                        "'&(iexcl|#161);'i",
                        "'&(cent|#162);'i",
                        "'&(pound|#163);'i",
                        "'&(copy|#169);'i");
                        
    $entitie_replacements = array ("\"",
                                   "&",
                                   "<",
                                   ">",
                                   " ",
                                   chr(161),
                                   chr(162),
                                   chr(163),
                                   chr(169));
    
  
    $string = preg_replace($entities, $entitie_replacements, $string);
    
    // Numeric haracter reference replacement (non-HEX), like &#64; => "@"
    $string = preg_replace_callback("/&#([0-9]{1,4});/ i", function($m) {return chr($m[1]);}, $string);
    
    // Numeric character reference replacement (HEX), like &#x2f; => "/"
    $string = preg_replace_callback("/&#x([0-9a-z]{2,4});/ i", function($m) {return chr(hexdec($m[1]));}, $string);
    
    return $string;
  }
448458
public function identQuote(string $name)
    {
        return $this->iquotechar . str_replace($this->iquotechar, $this->iquotechar . $this->iquotechar, $name) . $this->iquotechar;
    }
984360
protected function _quoteOneIdentifier($identifier)
        {
            $parts = explode('.', $identifier);
            $parts = array_map(array($this, '_quoteIdentifierPart'), $parts);

            return join('.', $parts);
        }
200853
private function isValidText($string)
    {
        $search = array(" ", "　", "\n", "\r", "\t");
        $replace = array("", "", "", "", "");
        return str_replace($search, $replace, $string) !== '';
    }
1093730
public function quote($string, $type = PDO::PARAM_STR)
    {
        return $this->getPDO()->quote($string, $type);
    }
969165
public function quoteIdent($ident)
	{
		if (is_array($ident)) {
			return array_map(function($ident) { return '`' . str_replace(array('`', '.'), array('``', '`.`'), $ident) . '`'; }, $ident);
		} else {
			return '`' . str_replace(array('`', '.'), array('``', '`.`'), $ident) . '`';
		}
	}
1067387
public static String quote(final String string) {
        int last = 0;
        final StringBuilder sb = new StringBuilder();
        for (int i = 0; i < string.length(); i++) {
            if (needsQuoting(string.charAt(i))) {
                sb.append(string, last, i);
                last = i = quote(sb, string, i);
            }
        }
        sb.append(string, last, string.length());
        return sb.toString();
    }
129458
protected function quoteIdentifier($str)
    {
        $open = '"';
        $close = '"';
        switch ($this->pdoDriver) {
            case 'mysql':
                $open = '`';
                $close = '`';
                break;
            case 'mssql':
                $open = '[';
                $close = ']';
                break;
        }
        return $open . str_replace($open, $open . $open, $str) . $close;
    }
814761
public function quoteIdent( $identifier )
    {

        // a identifier can be composite - separated by dots
        $fragments = explode('.',$identifier);
        foreach( $fragments as &$fragment ) {
            $fragment = sprintf(
                '"%s"',
                str_replace( '"', '""', $fragment )
            );
        }

        return implode('.',$fragments);

    }
655656
public function literal($string) {
        $string = trim($string, $this->_escapeCharOpen . $this->_escapeCharClose . $this->_quoteChar);
        return $string;
    }
72431
protected function identifierQuotes($str) {
		#for every word
		return preg_replace_callback('/(?<![\.a-zA-Z0-9_'.$this->quote.'\(\)])[a-z_][a-zA-Z0-9._]*/', function($matches) {
			$res = [];
			foreach(explode('.', $matches[0]) as $substr) {
				if(preg_match('/^[a-z_][a-zA-Z0-9_]*$/', $substr))
					$res[] = $this->quote.$substr.$this->quote;
				else
					$res[] = $substr;
			}
			return implode('.', $res);
		}, $str);
	}
1292678
public function quote_identifier($str)
    {
        $start = $this->options['identifier_start'];
        $end   = $this->options['identifier_end'];
        $name  = array();

        foreach (explode('.', $str) as $elem) {
            $elem = str_replace(array($start, $end), '', $elem);
            $name[] = $start . $elem . $end;
        }

        return implode($name, '.');
    }
963285
public static function hardDecode($string) {
		$data = htmlspecialchars_decode($string);
		$data = html_entity_decode($data);
		$data = strip_tags($data);
		$data = chop(Utility::convert_smart_quotes($data));
		$data = str_replace(array("\r", "\n", "	"), "", $data);

		return ($data);
	}
683443
public function nlToP($string)
	{
		$string = trim($string);
		$string = Modifiers::linebreaks($string);
		$string = str_replace("\n", "</p>\n<p>", $string);
		$string = str_replace('<p></p>', '', $string);
		return '<p>' . $string . '</p>' . PHP_EOL;
	}
604949
protected function decode($string)
    {
        $charset = $this->getDataCharset();
        if ($charset !== $this->getConnectionCharset()) {
            $string = iconv($this->getConnectionCharset(), $charset, $string);
        }
        if (get_magic_quotes_gpc()) {
            $string = stripslashes($string);
        }

        return $string;
    }