Class yii\db\conditions\LikeCondition
Inheritance | yii\db\conditions\LikeCondition » yii\db\conditions\SimpleCondition |
---|---|
Implements | yii\db\conditions\ConditionInterface |
Available since version | 2.0.14 |
Class LikeCondition represents a LIKE
condition.
Protected Properties
隐藏继承的属性 Hide inherited properties
属性Property | 类型 Type | 简介 Description | 定义在 Defined By |
---|---|---|---|
$escapingReplacements | array|false | Map of chars to their replacements, false if characters should not be escaped or either null or empty array if escaping is condition builder responsibility. | yii\db\conditions\LikeCondition |
Public Methods
隐藏继承的方法 Hide inherited methods
方法 Method | 简介 Description | 定义在 Defined By |
---|---|---|
__construct() | yii\db\conditions\LikeCondition | |
fromArrayDefinition() | Creates object by array-definition as described in Query Builder – Operator format guide article. | yii\db\conditions\LikeCondition |
getColumn() | yii\db\conditions\SimpleCondition | |
getEscapingReplacements() | yii\db\conditions\LikeCondition | |
getOperator() | yii\db\conditions\SimpleCondition | |
getValue() | yii\db\conditions\SimpleCondition | |
setEscapingReplacements() | This method allows to specify how to escape special characters in the value(s). | yii\db\conditions\LikeCondition |
属性详情 Property Details
Map of chars to their replacements, false if characters should not be escaped
or either null or empty array if escaping is condition builder responsibility.
By default it's set to null
.
方法详情 Method Details
public void __construct ( $column, $operator, $value ) | ||
$column | string | The column name. |
$operator | string | The operator to use (e.g. |
$value | string[]|string | Single value or an array of values that $column should be compared with.
If it is an empty array the generated expression will be a |
Creates object by array-definition as described in Query Builder – Operator format guide article.
public static $this fromArrayDefinition ( $operator, $operands ) | ||
$operator | string | Operator in uppercase. |
$operands | array | Array of corresponding operands |
throws | yii\base\InvalidArgumentException | if wrong number of operands have been given. |
---|
public array|false getEscapingReplacements ( ) |
This method allows to specify how to escape special characters in the value(s).
public void setEscapingReplacements ( $escapingReplacements ) | ||
$escapingReplacements |