A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.yiiframework.com/doc/api/2.0/yii-db-conditions-likecondition below:

LikeCondition, yii\db\conditions\LikeCondition | API Documentation for Yii 2.0

Class yii\db\conditions\LikeCondition

Class LikeCondition represents a LIKE condition.

Property Details

Hide inherited properties

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

Hide inherited methods

public void __construct ( $column, $operator, $value ) $column string

The column name.

$operator string

The operator to use (e.g. LIKE, NOT LIKE, OR LIKE or OR NOT LIKE)

$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 false value if operator is LIKE or OR LIKE and empty if operator is NOT LIKE or OR NOT LIKE.

Source code

                public function __construct($column, $operator, $value)
{
    parent::__construct($column, $operator, $value);
}

            

Creates object by array-definition as described in Query Builder – Operator format guide article.

Source code

                public static function fromArrayDefinition($operator, $operands)
{
    if (!isset($operands[0], $operands[1])) {
        throw new InvalidArgumentException("Operator '$operator' requires two operands.");
    }
    $condition = new static($operands[0], $operator, $operands[1]);
    if (isset($operands[2])) {
        $condition->escapingReplacements = $operands[2];
    }
    return $condition;
}

            

Source code

                public function getColumn()
{
    return $this->column;
}

            

Source code

                public function getEscapingReplacements()
{
    return $this->escapingReplacements;
}

            

Source code

                public function getOperator()
{
    return $this->operator;
}

            

Source code

                public function getValue()
{
    return $this->value;
}

            

This method allows to specify how to escape special characters in the value(s).

Source code

                public function setEscapingReplacements($escapingReplacements)
{
    $this->escapingReplacements = $escapingReplacements;
}

            

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4