protected function resolve($data)
    {
        if (!isset($data['action']) || !isset($data['timestamp']) || !isset($data['parameters']) || !is_array($data['parameters'])) {
            throw new \common_exception_InconsistentData(
                'Action parameters have to contain "action", "timestamp" and "parameters" fields.');
        }

        $availableActions = $this->getAvailableActions();
        $actionName = $data['action'];

        $actionClass = null;

        // Search by key (e.q. key)
        if (isset($availableActions[$actionName])) {
            $actionClass = $availableActions[$actionName];
        }

        if (is_null($actionClass) || !is_a($actionClass, TestRunnerAction::class, true)) {
            throw new \ResolverException('Action name "' . $actionName . '" could not be resolved.');
        }

        return $this->getServiceManager()->propagate(new $actionClass($actionName, $data['timestamp'], $data['parameters']));
    }
protected function resolve($data)
    {
        if (!isset($data['action']) || !isset($data['timestamp']) || !isset($data['parameters']) || !is_array($data['parameters'])) {
            throw new \common_exception_InconsistentData(
                'Action parameters have to contain "action", "timestamp" and "parameters" fields.');
        }

        $availableActions = $this->getAvailableActions();
        $actionName = $data['action'];

        $actionClass = null;

        
        if (isset($availableActions[$actionName])) {
            $actionClass = $availableActions[$actionName];
        }

        if (is_null($actionClass) || !is_a($actionClass, TestRunnerAction::class, true)) {
            throw new \ResolverException('Action name "' . $actionName . '" could not be resolved.');
        }

        return $this->getServiceManager()->propagate(new $actionClass($actionName, $data['timestamp'], $data['parameters']));
    }
protected function resolve ( $ data ) { if ( ! isset ( $ data [ 'action' ] ) || ! isset ( $ data [ 'timestamp' ] ) || ! isset ( $ data [ 'parameters' ] ) || ! is_array ( $ data [ 'parameters' ] ) ) { throw new \ common_exception_InconsistentData ( 'Action parameters have to contain "action", "timestamp" and "parameters" fields.' ) ; } $ availableActions = $ this -> getAvailableActions ( ) ; $ actionName = $ data [ 'action' ] ; $ actionClass = null ; // Search by key (e.q. key) if ( isset ( $ availableActions [ $ actionName ] ) ) { $ actionClass = $ availableActions [ $ actionName ] ; } if ( is_null ( $ actionClass ) || ! is_a ( $ actionClass , TestRunnerAction :: class , true ) ) { throw new \ ResolverException ( 'Action name "' . $ actionName . '" could not be resolved.' ) ; } return $ this -> getServiceManager ( ) -> propagate ( new $ actionClass ( $ actionName , $ data [ 'timestamp' ] , $ data [ 'parameters' ] ) ) ; }
Resolve a runner action to synchronize

@param $data
@return TestRunnerAction
@throws \ResolverException
@throws \common_exception_InconsistentData
Resolve a runner action to synchronize