yii\console\controllers\MessageController::isCategoryIgnored PHP Метод

isCategoryIgnored() защищенный Метод

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).
С версии: 2.0.7
protected isCategoryIgnored ( string $category, array $ignoreCategories ) : boolean
$category string category that is checked
$ignoreCategories array message categories to ignore.
Результат boolean
    protected function isCategoryIgnored($category, array $ignoreCategories)
    {
        $result = false;
        if (!empty($ignoreCategories)) {
            if (in_array($category, $ignoreCategories, true)) {
                $result = true;
            } else {
                foreach ($ignoreCategories as $pattern) {
                    if (strpos($pattern, '*') > 0 && strpos($category, rtrim($pattern, '*')) === 0) {
                        $result = true;
                        break;
                    }
                }
            }
        }
        return $result;
    }