protected function getAllowedMethodsForRoute(ControllerInterface $class, $action)
    {
        $actionsInfo = $class->getMethods();
        if (isset($actionsInfo[$action])) {
            $methods = implode(', ', $actionsInfo[$action]->getAllowedMethods());

            $methodInfo = ReflectionHelper::getMethodInfo($class, $action);

            header('Access-Control-Allow-Origin : *');
            header('Access-Control-Allow-Methods : ' . $methods);
            header('Access-Control-Allow-Headers : *');

            return $methodInfo;
        }

        return [];
    }