class SQLQuery_ParameterInjector (View source)

deprecated since version 4.0

Provides conversion of parameterised SQL to flattened SQL strings

Methods

public
__construct()

No description

public
array
injectConditions(array $conditions)

Given a list of parameterised conditions, return a flattened list of condition strings

protected
string
injectValues(string $sql, array $parameters)

Merge parameters into a SQL prepared condition

protected
bool
checkStringTogglesLiteral(string $input)

Determines if the SQL fragment either breaks into or out of a string literal by counting single quotes

Details

__construct()

No description

array injectConditions(array $conditions)

Given a list of parameterised conditions, return a flattened list of condition strings

Parameters

array $conditions

Return Value

array

protected string injectValues(string $sql, array $parameters)

Merge parameters into a SQL prepared condition

Parameters

string $sql
array $parameters

Return Value

string

protected bool checkStringTogglesLiteral(string $input)

Determines if the SQL fragment either breaks into or out of a string literal by counting single quotes

Handles double-quote escaped quotes as well as slash escaped quotes

Parameters

string $input

The SQL fragment

Return Value

bool

True if the string breaks into or out of a string literal