protected function isCategoryIgnored($category, array $ignoreCategories)
    {
        if (!empty($ignoreCategories)) {
            if (in_array($category, $ignoreCategories, true)) {
                return true;
            }
            foreach ($ignoreCategories as $pattern) {
                if (strpos($pattern, '*') > 0 && strpos($category, rtrim($pattern, '*')) === 0) {
                    return true;
                }
            }
        }

        return false;
    }
protected function isCategoryIgnored($category, array $ignoreCategories)
    {
        if (!empty($ignoreCategories)) {
            if (in_array($category, $ignoreCategories, true)) {
                return true;
            }
            foreach ($ignoreCategories as $pattern) {
                if (strpos($pattern, '*') > 0 && strpos($category, rtrim($pattern, '*')) === 0) {
                    return true;
                }
            }
        }

        return false;
    }
protected function isCategoryIgnored ( $ category , array $ ignoreCategories ) { if ( ! empty ( $ ignoreCategories ) ) { if ( in_array ( $ category , $ ignoreCategories , true ) ) { return true ; } foreach ( $ ignoreCategories as $ pattern ) { if ( strpos ( $ pattern , '*' ) > 0 && strpos ( $ category , rtrim ( $ pattern , '*' ) ) === 0 ) { return true ; } } } return false ; }
The method checks, whether the $category is ignored according to $ignoreCategories array.

Examples:

- `myapp` - will be ignored only `myapp` category;
- `myapp*` - will be ignored by all categories beginning with `myapp` (`myapp`, `myapplication`, `myapprove`, `myapp/widgets`, `myapp.widgets`, etc).

@param string $category category that is checked
@param array $ignoreCategories message categories to ignore.
@return bool
@since 2.0.7
The method checks whether the $category is ignored according to $ignoreCategories array .