Neos\Flow\Cli\CommandManager::getCommandControllerMethodArguments PHP Method

getCommandControllerMethodArguments() public static method

public static getCommandControllerMethodArguments ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
return array Array of method arguments per controller and method.
    public static function getCommandControllerMethodArguments($objectManager)
    {
        /** @var ReflectionService $reflectionService */
        $reflectionService = $objectManager->get(ReflectionService::class);
        $commandControllerMethodArgumentMap = [];
        foreach ($reflectionService->getAllSubClassNamesForClass(CommandController::class) as $className) {
            if (!class_exists($className) || $reflectionService->isClassAbstract($className)) {
                continue;
            }
            $controllerObjectName = $objectManager->getObjectNameByClassName($className);
            $commandControllerMethodArgumentMap[$controllerObjectName] = [];
            foreach (get_class_methods($className) as $methodName) {
                if (substr($methodName, -7, 7) === 'Command') {
                    $commandControllerMethodArgumentMap[$className][$methodName] = $reflectionService->getMethodParameters($controllerObjectName, $methodName);
                }
            }
        }
        return $commandControllerMethodArgumentMap;
    }