src/acdhOeaw/util/Indexer.php
public function setFilter(string $filter, int $type = self::MATCH): Indexer {
        switch ($type) {
            case self::MATCH:
                $this->filter    = $filter;
                break;
            case self::SKIP:
                $this->filterNot = $filter;
                break;
            default:
                throw new BadMethodCallException('wrong $type parameter');
        }
        return $this;
    }
public function setFilter(string $filter, int $type = self::MATCH): Indexer {
        switch ($type) {
            case self::MATCH:
                $this->filter    = $filter;
                break;
            case self::SKIP:
                $this->filterNot = $filter;
                break;
            default:
                throw new BadMethodCallException('wrong $type parameter');
        }
        return $this;
    }
public function setFilter ( string $ filter , int $ type = self :: MATCH ) : Indexer { switch ( $ type ) { case self :: MATCH : $ this -> filter = $ filter ; break ; case self :: SKIP : $ this -> filterNot = $ filter ; break ; default : throw new BadMethodCallException ( 'wrong $type parameter' ) ; } return $ this ; }
Sets file name filter for child resources.

You can choose if file names must match or must not match (skip) the
filter using the $type parameter. You can set both match and skip
filters by calling setFilter() two times (once with
`$type = Indexer::MATCH` and second time with `$type = Indexer::SKIP`).

Filter is applied only to file names but NOT to directory names.

@param string $filter regular expression conformant with preg_replace()
@param int $type decides if $filter is a match or skip filter (can be
one of Indexer::MATCH and Indexer::SKIP)
@return \acdhOeaw\util\Indexer
Sets file name filter for child resources .