Solar_Sql_Adapter::_quoteNamesIn PHP 메소드

_quoteNamesIn() 보호된 메소드

Quotes all fully-qualified identifier names ("table.col") in a string.
또한 보기: quoteNamesIn()
protected _quoteNamesIn ( string | array $text ) : string | array
$text string | array The string in which to quote fully-qualified identifier names to quote. If an array, quotes names in each element in the array.
리턴 string | array The string (or array) with names quoted in it.
    protected function _quoteNamesIn($text)
    {
        $word = "[a-z_][a-z0-9_]+";
        $find = "/(\\b)({$word})\\.({$word})(\\b)/i";
        $repl = '$1' . $this->_ident_quote_prefix . '$2' . $this->_ident_quote_suffix . '.' . $this->_ident_quote_prefix . '$3' . $this->_ident_quote_suffix . '$4';
        $text = preg_replace($find, $repl, $text);
        return $text;
    }