private function triggerAction($action): Response
    {
        if (is_callable($action)) {
            return $this->returnResponse(
                $this->container->call($action)
            );
        } elseif (is_array($action)) {
            return $this->returnResponse(
                $this->container->call(
                    [
                        $action['controller'],
                        $action['method'],
                    ],
                    $action['arguments']
                )
            );
        }

        throw new \InvalidArgumentException('Route\'s action could not be handled.');
    }
private function triggerAction($action): Response
    {
        if (is_callable($action)) {
            return $this->returnResponse(
                $this->container->call($action)
            );
        } elseif (is_array($action)) {
            return $this->returnResponse(
                $this->container->call(
                    [
                        $action['controller'],
                        $action['method'],
                    ],
                    $action['arguments']
                )
            );
        }

        throw new \InvalidArgumentException('Route\'s action could not be handled.');
    }
private function triggerAction ( $ action ) : Response { if ( is_callable ( $ action ) ) { return $ this -> returnResponse ( $ this -> container -> call ( $ action ) ) ; } elseif ( is_array ( $ action ) ) { return $ this -> returnResponse ( $ this -> container -> call ( [ $ action [ 'controller' ] , $ action [ 'method' ] , ] , $ action [ 'arguments' ] ) ) ; } throw new \ InvalidArgumentException ( 'Route\'s action could not be handled.' ) ; }
Triggers an action.

@param $action

@throws \Shorty\Framework\Routing\Exceptions\HTTPException

@return \GuzzleHttp\Psr7\Response
Triggers an action .