PHP safe string builder. Builds SQL query.
PHP does not provide the capability to securely build SQL strings statically. One would need to rely on PDO or MySQLi, but what if there isn't a database to connect to and you just need to construct an escaped query?
An example use case: constructing an SQL string to be executed via STDIN in a mysql client on a remote server via SSH.
# Instantiate the object
$sqlBuilder = new SqlBuilder();
# Write the query template
$query = 'SELECT * FROM this_table WHERE this_field = :value AND other_field = :value2';
# Safely build the query
$safeQuery = $sqlBuilder->build($query, [
':value' => 'This is a value',
':value2' => 123
]);