init
This commit is contained in:
49
vendor/yiisoft/yii2/db/conditions/HashCondition.php
vendored
Normal file
49
vendor/yiisoft/yii2/db/conditions/HashCondition.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @link http://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
* @license http://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
namespace yii\db\conditions;
|
||||
|
||||
/**
|
||||
* Condition based on column-value pairs.
|
||||
*
|
||||
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
|
||||
* @since 2.0.14
|
||||
*/
|
||||
class HashCondition implements ConditionInterface
|
||||
{
|
||||
/**
|
||||
* @var array|null the condition specification.
|
||||
*/
|
||||
private $hash;
|
||||
|
||||
|
||||
/**
|
||||
* HashCondition constructor.
|
||||
*
|
||||
* @param array|null $hash
|
||||
*/
|
||||
public function __construct($hash)
|
||||
{
|
||||
$this->hash = $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|null
|
||||
*/
|
||||
public function getHash()
|
||||
{
|
||||
return $this->hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function fromArrayDefinition($operator, $operands)
|
||||
{
|
||||
return new static($operands);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user