private function newAction($class, $engine)
    {
        if (!class_exists($engine)) {
            throw new StatusCode\BadRequestException('Could not resolve engine');
        }

        try {
            $action = $this->actionFactory->factory($class, $engine);
        } catch (FactoryResolveException $e) {
            throw new StatusCode\BadRequestException($e->getMessage());
        }

        if (!$action instanceof ActionInterface) {
            throw new StatusCode\BadRequestException('Could not resolve action');
        }

        return $action;
    }
private function newAction($class, $engine)
    {
        if (!class_exists($engine)) {
            throw new StatusCode\BadRequestException('Could not resolve engine');
        }

        try {
            $action = $this->actionFactory->factory($class, $engine);
        } catch (FactoryResolveException $e) {
            throw new StatusCode\BadRequestException($e->getMessage());
        }

        if (!$action instanceof ActionInterface) {
            throw new StatusCode\BadRequestException('Could not resolve action');
        }

        return $action;
    }
private function newAction ( $ class , $ engine ) { if ( ! class_exists ( $ engine ) ) { throw new StatusCode \ BadRequestException ( 'Could not resolve engine' ) ; } try { $ action = $ this -> actionFactory -> factory ( $ class , $ engine ) ; } catch ( FactoryResolveException $ e ) { throw new StatusCode \ BadRequestException ( $ e -> getMessage ( ) ) ; } if ( ! $ action instanceof ActionInterface ) { throw new StatusCode \ BadRequestException ( 'Could not resolve action' ) ; } return $ action ; }
Checks whether the provided class is resolvable and returns an action
instance

@param string $class
@param string $engine
@return \Fusio\Engine\ActionInterface
Checks whether the provided class is resolvable and returns an action instance