public static function getControllerPublicMethods(string $controllerName): array
    {
        $actions = [];

        if (!class_exists($controllerName)) {
            return $actions;
        }

        $refClass = new \ReflectionClass($controllerName);
        foreach ($refClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
            $actions[] = $method->name;
        }

        return $actions;
    }
public static function getControllerPublicMethods(string $controllerName): array
    {
        $actions = [];

        if (!class_exists($controllerName)) {
            return $actions;
        }

        $refClass = new \ReflectionClass($controllerName);
        foreach ($refClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
            $actions[] = $method->name;
        }

        return $actions;
    }
public static function getControllerPublicMethods ( string $ controllerName ) : array { $ actions = [ ] ; if ( ! class_exists ( $ controllerName ) ) { return $ actions ; } $ refClass = new \ ReflectionClass ( $ controllerName ) ; foreach ( $ refClass -> getMethods ( \ ReflectionMethod :: IS_PUBLIC ) as $ method ) { $ actions [ ] = $ method -> name ; } return $ actions ; }
Method that retrieves and returns Controller public methods.

@param  string $controllerName Controller name
@return mixed[]
Method that retrieves and returns Controller public methods .