public function process()
    {
        $this->validate();

        $itemIdentifier = $this->hasRequestParameter('itemDefinition')
            ? $this->getRequestParameter('itemDefinition')
            : null;

        if (!is_array($itemIdentifier)) {
            $itemIdentifier = [$itemIdentifier];
        }

        try {
            if (!$this->getRunnerService()->getTestConfig()->getConfigValue('itemCaching.enabled')) {
                common_Logger::w('Attempt to disclose the next items without the configuration');
                throw new common_exception_Unauthorized();
            }

            $response = [];
            foreach ($itemIdentifier as $itemId) {
                //load item data
                $response['items'][] = $this->getItemData($itemId);
            }

            if (isset($response['items'])) {
                $response['success'] = true;
            }
        } catch (\Exception $e) {
            $response = $this->getErrorResponse($e);
        }

        return $response;
    }
public function process()
    {
        $this->validate();

        $itemIdentifier = $this->hasRequestParameter('itemDefinition')
            ? $this->getRequestParameter('itemDefinition')
            : null;

        if (!is_array($itemIdentifier)) {
            $itemIdentifier = [$itemIdentifier];
        }

        try {
            if (!$this->getRunnerService()->getTestConfig()->getConfigValue('itemCaching.enabled')) {
                common_Logger::w('Attempt to disclose the next items without the configuration');
                throw new common_exception_Unauthorized();
            }

            $response = [];
            foreach ($itemIdentifier as $itemId) {
                
                $response['items'][] = $this->getItemData($itemId);
            }

            if (isset($response['items'])) {
                $response['success'] = true;
            }
        } catch (\Exception $e) {
            $response = $this->getErrorResponse($e);
        }

        return $response;
    }
public function process ( ) { $ this -> validate ( ) ; $ itemIdentifier = $ this -> hasRequestParameter ( 'itemDefinition' ) ? $ this -> getRequestParameter ( 'itemDefinition' ) : null ; if ( ! is_array ( $ itemIdentifier ) ) { $ itemIdentifier = [ $ itemIdentifier ] ; } try { if ( ! $ this -> getRunnerService ( ) -> getTestConfig ( ) -> getConfigValue ( 'itemCaching.enabled' ) ) { common_Logger :: w ( 'Attempt to disclose the next items without the configuration' ) ; throw new common_exception_Unauthorized ( ) ; } $ response = [ ] ; foreach ( $ itemIdentifier as $ itemId ) { //load item data $ response [ 'items' ] [ ] = $ this -> getItemData ( $ itemId ) ; } if ( isset ( $ response [ 'items' ] ) ) { $ response [ 'success' ] = true ; } } catch ( \ Exception $ e ) { $ response = $ this -> getErrorResponse ( $ e ) ; } return $ response ; }
Get item data by identifier

Validate required fields.
Get item data by given identifier

@return array
@throws
Get item data by identifier