HumHub Documentation (unofficial)

LikeConditionBuilder extends LikeConditionBuilder
in package

Class LikeConditionBuilder builds objects of [[LikeCondition]]

Table of Contents

Properties

$escapeCharacter  : string|null
$escapingReplacements  : array<string|int, mixed>
`\` is initialized in [[buildLikeCondition()]] method since we need to choose replacement value based on [[\yii\db\Schema::quoteValue()]].
$queryBuilder  : QueryBuilder

Methods

__construct()  : mixed
ExpressionBuilderTrait constructor.
build()  : string
Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.
parseOperator()  : array<string|int, mixed>
getEscapeSql()  : string

Properties

$escapeCharacter

protected string|null $escapeCharacter = '!'

character used to escape special characters in LIKE conditions. By default it's assumed to be \.

$escapingReplacements

`\` is initialized in [[buildLikeCondition()]] method since we need to choose replacement value based on [[\yii\db\Schema::quoteValue()]].

protected array<string|int, mixed> $escapingReplacements = ['%' => '!%', '_' => '!_', '!' => '!!']

map of chars to their replacements in LIKE conditions. By default it's configured to escape %, _ and \ with \.

Methods

build()

Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.

public build(ExpressionInterface $expression[, array<string|int, mixed> &$params = [] ]) : string
Parameters
$expression : ExpressionInterface

the expression to be built.

$params : array<string|int, mixed> = []

the binding parameters.

Return values
string

the raw SQL that will not be additionally escaped or quoted.

parseOperator()

protected parseOperator(string $operator) : array<string|int, mixed>
Parameters
$operator : string
Return values
array<string|int, mixed>

        
On this page

Search results