ConditionInterface.php 996 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\db\conditions;
  8. use yii\base\InvalidParamException;
  9. use yii\db\ExpressionInterface;
  10. /**
  11. * Interface ConditionInterface should be implemented by classes that represent a condition
  12. * in DBAL of framework.
  13. *
  14. * @author Dmytro Naumenko <d.naumenko.a@gmail.com>
  15. * @since 2.0.14
  16. */
  17. interface ConditionInterface extends ExpressionInterface
  18. {
  19. /**
  20. * Creates object by array-definition as described in
  21. * [Query Builder – Operator format](guide:db-query-builder#operator-format) guide article.
  22. *
  23. * @param string $operator operator in uppercase.
  24. * @param array $operands array of corresponding operands
  25. *
  26. * @return $this
  27. * @throws InvalidParamException if input parameters are not suitable for this condition
  28. */
  29. public static function fromArrayDefinition($operator, $operands);
  30. }