Neos\Flow\ObjectManagement\CompileTimeObjectManager::filterClassNamesFromConfiguration PHP Method

filterClassNamesFromConfiguration() protected method

Given an array of class names by package key this filters out classes that have been configured to be excluded or included by object management.
protected filterClassNamesFromConfiguration ( array $classNames, array $includeClassesConfiguration ) : array
$classNames array 2-level array - key of first level is package key, value of second level is classname (FQN)
$includeClassesConfiguration array array of includeClasses configurations
return array The input array with all configured to be excluded from object management filtered out
    protected function filterClassNamesFromConfiguration(array $classNames, $includeClassesConfiguration)
    {
        if (isset($this->allSettings['Neos']['Flow']['object']['excludeClasses'])) {
            $this->systemLogger->log('Using "Neos.Flow.object.excludeClasses" is deprecated. Non flow packages are no longer enabled for object management by default, you can use "Neos.Flow.object.includeClasses" to add them. You can also use it to remove classes of flow packages from object management as any classes that do not match the given expression(s) are excluded if it is configured for a package.');
            if (!is_array($this->allSettings['Neos']['Flow']['object']['excludeClasses'])) {
                throw new InvalidConfigurationTypeException('The setting "Neos.Flow.object.excludeClasses" is invalid, it must be an array if set. Check the syntax in the YAML file.', 1422357311);
            }
            $excludeClasses = $this->collectExcludedPackages(array_keys($classNames));
            $classNames = $this->applyClassFilterConfiguration($classNames, $excludeClasses, 'exclude');
        }
        $classNames = $this->applyClassFilterConfiguration($classNames, $includeClassesConfiguration);
        return $classNames;
    }