Private/Polyfony/Query/Convert.php
public static function columnToPlaceholder(
		string $quote_symbol, 
		string $column, 
		$allow_wildcard = false
	) :array {
        // apply the secure regex for the column name
        $column = preg_replace(($allow_wildcard ? '/[^a-zA-Z0-9_\.\*]/' : '/[^a-zA-Z0-9_\.]/'), '', $column);    
        // cleanup the placeholder
        $placeholder = str_replace(['.', '*'], '_', strtolower($column)); 
        // return cleaned column
        return([$quote_symbol . $column . $quote_symbol, $placeholder]);
	}
public static function columnToPlaceholder(
		string $quote_symbol, 
		string $column, 
		$allow_wildcard = false
	) :array {
        // apply the secure regex for the column name
        $column = preg_replace(($allow_wildcard ? '/[^a-zA-Z0-9_\.\*]/' : '/[^a-zA-Z0-9_\.]/'), '', $column);    
        // cleanup the placeholder
        $placeholder = str_replace(['.', '*'], '_', strtolower($column)); 
        // return cleaned column
        return([$quote_symbol . $column . $quote_symbol, $placeholder]);
	}
public static function columnToPlaceholder ( string $ quote_symbol , string $ column , $ allow_wildcard = false ) : array { // apply the secure regex for the column name $ column = preg_replace ( ( $ allow_wildcard ? '/[^a-zA-Z0-9_\.\*]/' : '/[^a-zA-Z0-9_\.]/' ) , '' , $ column ) ; // cleanup the placeholder $ placeholder = str_replace ( [ '.' , '*' ] , '_' , strtolower ( $ column ) ) ; // return cleaned column return ( [ $ quote_symbol . $ column . $ quote_symbol , $ placeholder ] ) ; }
get a column placeholder to build queries with
get a column placeholder to build queries with