protected function getResultStorage($delivery)
    {
        /** @var ResultServerService $resultServerService */
        $resultServerService = $this->getServiceManager()->get(ResultServerService::SERVICE_ID);
        $resultStorage = $resultServerService->getResultStorage($delivery->getUri());
        if ($resultStorage instanceof NoResultStorage){
           throw NoResultStorageException::create();
        }

        if (!$resultStorage instanceof \taoResultServer_models_classes_ReadableResultStorage){
           throw new \common_exception_Error('The results storage it is not readable');
        }
        $this->getResultsService()->setImplementation($resultStorage);
        return $resultStorage;
    }
protected function getResultStorage($delivery)
    {
        /** @var ResultServerService $resultServerService */
        $resultServerService = $this->getServiceManager()->get(ResultServerService::SERVICE_ID);
        $resultStorage = $resultServerService->getResultStorage($delivery->getUri());
        if ($resultStorage instanceof NoResultStorage){
           throw NoResultStorageException::create();
        }

        if (!$resultStorage instanceof \taoResultServer_models_classes_ReadableResultStorage){
           throw new \common_exception_Error('The results storage it is not readable');
        }
        $this->getResultsService()->setImplementation($resultStorage);
        return $resultStorage;
    }
protected function getResultStorage ( $ delivery ) { /** @var ResultServerService $resultServerService */ $ resultServerService = $ this -> getServiceManager ( ) -> get ( ResultServerService :: SERVICE_ID ) ; $ resultStorage = $ resultServerService -> getResultStorage ( $ delivery -> getUri ( ) ) ; if ( $ resultStorage instanceof NoResultStorage ) { throw NoResultStorageException :: create ( ) ; } if ( ! $ resultStorage instanceof \ taoResultServer_models_classes_ReadableResultStorage ) { throw new \ common_exception_Error ( 'The results storage it is not readable' ) ; } $ this -> getResultsService ( ) -> setImplementation ( $ resultStorage ) ; return $ resultStorage ; }
Returns the currently configured result storage

@param \core_kernel_classes_Resource $delivery
@return \taoResultServer_models_classes_ReadableResultStorage
Returns the currently configured result storage