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

namespace Kufer\Web\KuferTools\Utils\FilterSettings\Dozenten;

use Kufer\Web\Classes\Dbfilter\DozentenSQLFilter;
use Kufer\Web\KuferTools\Utils\FilterSettings\IFilterSettings;
use Kufer\Web\Classes\Dbfilter\ISQLFilter;

class NotTypFilterSettings implements IFilterSettings
{
  
  private $dozTyp;

  public function __construct(array $dozTyp)
  {
    $this->dozTyp = $dozTyp;
  }

  
  public function applySettings($filter): ISQLFilter
  {
    return $filter->notAny(function(\Kufer\Web\Classes\Dbfilter\DozentenSQLFilter $filter) {
      return $filter->inTyp($this->dozTyp);
    });
  }

  public function assertFilterClass($filter): void
  {
    assert($filter instanceof DozentenSQLFilter);
  }
}