<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

declare(strict_types = 1);

namespace Kufer\Web\Classes\Dbfilter\RegisteredCall;

use Kufer\Web\Classes\Dbfilter\AbstractSQLFilter;
use Kufer\Web\Classes\Dbfilter\SQLFilterUtils;

interface IRegisteredCall
{
  public const SUPPORTS_EQUALS = 0x0001;
  public const SUPPORTS_EQUALS_DEFAULT = 0x0002;
  public const SUPPORTS_IN = 0x0004;
  public const SUPPORTS_IN_DEFAULT = 0x0008;
  public const SUPPORTS_LIKE = 0x0010;
  public const SUPPORTS_CONTAINS = 0x0020;
  public const SUPPORTS_LESS = 0x0040;
  public const SUPPORTS_LESS_DEFAULT = 0x0080;
  public const SUPPORTS_GREATER = 0x0100;
  public const SUPPORTS_GREATER_DEFAULT = 0x0200;
  public const SUPPORTS_IS = 0x0400;
  public const SUPPORTS_IS_DEFAULT = 0x0800;
  public const SUPPORTS_HAS = 0x1000;
  public const SUPPORTS_HAS_ANY = 0x2000;

  public function getName(): string;

  public function getType(): int;

  
  public function getCapabilities(): int;

  
  public function equals(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value): callable;

  public function equalsDefault(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value, $default): callable;

  public function in(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, iterable $value): callable;

  public function inDefault(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, iterable $value, $default): callable;

  public function like(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value): callable;

  public function contains(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value): callable;

  public function less(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value): callable;

  public function lessDefault(AbstractSQLFilter $filter, $value, $default): callable;

  public function greater(\Kufer\Web\Classes\Dbfilter\AbstractSQLFilter $filter, $value): callable;

  public function greaterDefault(AbstractSQLFilter $filter, $value, $default): callable;

  public function is(AbstractSQLFilter $filter): callable;

  public function isDefault(AbstractSQLFilter $filter, $default): callable;

  public function has(AbstractSQLFilter $filter, $value): callable;

  public function hasAny(AbstractSQLFilter $filter, iterable $values): callable;
}