protected function registerClassFiles(array $packages)
    {
        $includeClassesConfiguration = [];
        if (isset($this->allSettings['Neos']['Flow']['object']['includeClasses'])) {
            if (!is_array($this->allSettings['Neos']['Flow']['object']['includeClasses'])) {
                throw new InvalidConfigurationTypeException('The setting "Neos.Flow.object.includeClasses" is invalid, it must be an array if set. Check the syntax in the YAML file.', 1422357285);
            }

            $includeClassesConfiguration = $this->allSettings['Neos']['Flow']['object']['includeClasses'];
        }

        $availableClassNames = ['' => ['DateTime']];

        $shouldRegisterFunctionalTestClasses = (bool)($this->allSettings['Neos']['Flow']['object']['registerFunctionalTestClasses'] ?? false);

        /** @var \Neos\Flow\Package\PackageInterface $package */
        foreach ($packages as $packageKey => $package) {
            $packageType = (string)$package->getComposerManifest('type');
            if (ComposerUtility::isFlowPackageType($packageType) || isset($includeClassesConfiguration[$packageKey])) {
                foreach ($package->getClassFiles() as $fullClassName => $path) {
                    if (substr($fullClassName, -9, 9) !== 'Exception') {
                        $availableClassNames[$packageKey][] = $fullClassName;
                    }
                }
                if ($package instanceof FlowPackageInterface && $shouldRegisterFunctionalTestClasses) {
                    foreach ($package->getFunctionalTestsClassFiles() as $fullClassName => $path) {
                        if (substr($fullClassName, -9, 9) !== 'Exception') {
                            $availableClassNames[$packageKey][] = $fullClassName;
                        }
                    }
                }
                if (isset($availableClassNames[$packageKey]) && is_array($availableClassNames[$packageKey])) {
                    $availableClassNames[$packageKey] = array_unique($availableClassNames[$packageKey]);
                }
            }
        }
        return $this->filterClassNamesFromConfiguration($availableClassNames, $includeClassesConfiguration);
    }
protected function registerClassFiles(array $packages)
    {
        $includeClassesConfiguration = [];
        if (isset($this->allSettings['Neos']['Flow']['object']['includeClasses'])) {
            if (!is_array($this->allSettings['Neos']['Flow']['object']['includeClasses'])) {
                throw new InvalidConfigurationTypeException('The setting "Neos.Flow.object.includeClasses" is invalid, it must be an array if set. Check the syntax in the YAML file.', 1422357285);
            }

            $includeClassesConfiguration = $this->allSettings['Neos']['Flow']['object']['includeClasses'];
        }

        $availableClassNames = ['' => ['DateTime']];

        $shouldRegisterFunctionalTestClasses = (bool)($this->allSettings['Neos']['Flow']['object']['registerFunctionalTestClasses'] ?? false);

        /** @var \Neos\Flow\Package\PackageInterface $package */
        foreach ($packages as $packageKey => $package) {
            $packageType = (string)$package->getComposerManifest('type');
            if (ComposerUtility::isFlowPackageType($packageType) || isset($includeClassesConfiguration[$packageKey])) {
                foreach ($package->getClassFiles() as $fullClassName => $path) {
                    if (substr($fullClassName, -9, 9) !== 'Exception') {
                        $availableClassNames[$packageKey][] = $fullClassName;
                    }
                }
                if ($package instanceof FlowPackageInterface && $shouldRegisterFunctionalTestClasses) {
                    foreach ($package->getFunctionalTestsClassFiles() as $fullClassName => $path) {
                        if (substr($fullClassName, -9, 9) !== 'Exception') {
                            $availableClassNames[$packageKey][] = $fullClassName;
                        }
                    }
                }
                if (isset($availableClassNames[$packageKey]) && is_array($availableClassNames[$packageKey])) {
                    $availableClassNames[$packageKey] = array_unique($availableClassNames[$packageKey]);
                }
            }
        }
        return $this->filterClassNamesFromConfiguration($availableClassNames, $includeClassesConfiguration);
    }
protected function registerClassFiles ( array $ packages ) { $ includeClassesConfiguration = [ ] ; if ( isset ( $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'includeClasses' ] ) ) { if ( ! is_array ( $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'includeClasses' ] ) ) { throw new InvalidConfigurationTypeException ( 'The setting "Neos.Flow.object.includeClasses" is invalid, it must be an array if set. Check the syntax in the YAML file.' , 1422357285 ) ; } $ includeClassesConfiguration = $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'includeClasses' ] ; } $ availableClassNames = [ '' => [ 'DateTime' ] ] ; $ shouldRegisterFunctionalTestClasses = ( bool ) ( $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'registerFunctionalTestClasses' ] ?? false ) ; /** @var \Neos\Flow\Package\PackageInterface $package */ foreach ( $ packages as $ packageKey => $ package ) { $ packageType = ( string ) $ package -> getComposerManifest ( 'type' ) ; if ( ComposerUtility :: isFlowPackageType ( $ packageType ) || isset ( $ includeClassesConfiguration [ $ packageKey ] ) ) { foreach ( $ package -> getClassFiles ( ) as $ fullClassName => $ path ) { if ( substr ( $ fullClassName , - 9 , 9 ) !== 'Exception' ) { $ availableClassNames [ $ packageKey ] [ ] = $ fullClassName ; } } if ( $ package instanceof FlowPackageInterface && $ shouldRegisterFunctionalTestClasses ) { foreach ( $ package -> getFunctionalTestsClassFiles ( ) as $ fullClassName => $ path ) { if ( substr ( $ fullClassName , - 9 , 9 ) !== 'Exception' ) { $ availableClassNames [ $ packageKey ] [ ] = $ fullClassName ; } } } if ( isset ( $ availableClassNames [ $ packageKey ] ) && is_array ( $ availableClassNames [ $ packageKey ] ) ) { $ availableClassNames [ $ packageKey ] = array_unique ( $ availableClassNames [ $ packageKey ] ) ; } } } return $ this -> filterClassNamesFromConfiguration ( $ availableClassNames , $ includeClassesConfiguration ) ; }
Traverses through all class files of the active packages and registers collects the class names as
"all available class names". If the respective Flow settings say so, also function test classes
are registered.

For performance reasons this function ignores classes whose name ends with "Exception".

@param array $packages A list of packages to consider
@return array A list of class names which were discovered in the given packages

@throws InvalidConfigurationTypeException
Traverses through all class files of the active packages and registers collects the class names as all available class names . If the respective Flow settings say so also function test classes are registered .