src/Composer/ModuleFinder.php
public function findRoutes(): array
    {
        /** @var array[] $routes */
        $routes = [];

        $modules = $this->packageRepository->findModules();
        foreach ($modules as $module) {
            $extra = $module->getExtra();
            $this->validateRoutesSectionInExtra($extra);
            if (empty($extra['phplist/core']['routes'])) {
                continue;
            }

            /** @var array $moduleRoutes */
            $moduleRoutes = $extra['phplist/core']['routes'];
            foreach ($moduleRoutes as $name => $route) {
                $prefixedRouteName = $module->getName() . '.' . $name;
                $routes[$prefixedRouteName] = $route;
            }
        }

        return $routes;
    }
public function findRoutes(): array
    {
        /** @var array[] $routes */
        $routes = [];

        $modules = $this->packageRepository->findModules();
        foreach ($modules as $module) {
            $extra = $module->getExtra();
            $this->validateRoutesSectionInExtra($extra);
            if (empty($extra['phplist/core']['routes'])) {
                continue;
            }

            /** @var array $moduleRoutes */
            $moduleRoutes = $extra['phplist/core']['routes'];
            foreach ($moduleRoutes as $name => $route) {
                $prefixedRouteName = $module->getName() . '.' . $name;
                $routes[$prefixedRouteName] = $route;
            }
        }

        return $routes;
    }
public function findRoutes ( ) : array { /** @var array[] $routes */ $ routes = [ ] ; $ modules = $ this -> packageRepository -> findModules ( ) ; foreach ( $ modules as $ module ) { $ extra = $ module -> getExtra ( ) ; $ this -> validateRoutesSectionInExtra ( $ extra ) ; if ( empty ( $ extra [ 'phplist/core' ] [ 'routes' ] ) ) { continue ; } /** @var array $moduleRoutes */ $ moduleRoutes = $ extra [ 'phplist/core' ] [ 'routes' ] ; foreach ( $ moduleRoutes as $ name => $ route ) { $ prefixedRouteName = $ module -> getName ( ) . '.' . $ name ; $ routes [ $ prefixedRouteName ] = $ route ; } } return $ routes ; }
Finds the routes in all installed modules.

@return array[] class names of the routes of all installed phpList modules:
['route name' => [route configuration]

@throws \InvalidArgumentException
Finds the routes in all installed modules .