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

namespace Kufer\Web\KuferTools\Utils\FilterSearch;

use Kufer\Web\KuferTools\Utils\FilterSearch\Method\EqualsIntMethod;
use Kufer\Web\KuferTools\Utils\FilterSearch\Method\NotMethod;
use Kufer\Web\KuferTools\Utils\FilterSearch\Method\StartsWithStringMethod;

class KennzeichenSearchFilter extends ToolSearchFilter
{
  public function __construct()
  {
    parent::__construct();

    $this->addSearch(
      'kennz',
      new EqualsIntMethod('Kennzeichen')
    );

    $this->addAliasFor('nummer', 'kennz');

    $this->addSearch(
      'not_kennz',
      new NotMethod(new EqualsIntMethod('Kennzeichen'))
    );

    $this->addAliasFor('nicht_kennzeichen_nummer', 'not_kennz');

    $this->addSearch(
      'text',
      new StartsWithStringMethod('Text')
    );

    $this->addAliasFor('name', 'text');
  }
}