public function addFilter(string $pattern, Filter $filter = null): void
    {
        $this->filters[$pattern] = $filter;
    }
public function addFilter(string $pattern, Filter $filter = null): void
    {
        $this->filters[$pattern] = $filter;
    }
public function addFilter ( string $ pattern , Filter $ filter = null ) : void { $ this -> filters [ $ pattern ] = $ filter ; }
Add custom pattern to be filtered.

Matched text will be filtered with a given filter or with
{@link Mekras\Speller\Source\Filter\StripAllFilter} if $filter is null.

@param string $pattern PCRE pattern. It is recommended to use "ums" PCRE modifiers.
@param Filter $filter  Filter to be applied.

@since 1.2
Add custom pattern to be filtered .