@param LoopResult $loopResult

@return LoopResult
488424
public function parseResults(LoopResult $loopResult)
    {
        /** @var DealerContact $contact */
        foreach ($loopResult->getResultDataCollection() as $contact) {
            $loopResultRow = new LoopResultRow($contact);

            $loopResultRow
                ->set('ID', $contact->getId())
                ->set('DEALER_ID', $contact->getDealerId())
                ->set('IS_DEFAULT', $contact->getIsDefault());

            if ($contact->hasVirtualColumn('i18n_LABEL')) {
                $loopResultRow->set("LABEL", $contact->getVirtualColumn('i18n_LABEL'));
            }

            $loopResult->addRow($loopResultRow);
        }

        return $loopResult;
    }
395412
public function getContent($rowResult)
    {
        if ($this->callManager($rowResult) === false) {
            return '';
        }

        return $this->builder->render($this->template);
    }
1113199
protected function ParseXMLResponse($sResult)
    {
        $oXMLResponse = new SimpleXMLElement($sResult);
        foreach ($oXMLResponse->attributes() as $sAttributeName => $sAttributeValue) {
            $sAttributeName = strtoupper($sAttributeName);
            $this->aXMLResponseData[$sAttributeName] = (string) $sAttributeValue;
        }
        if (isset($oXMLResponse->HTML_ANSWER)) {
            $this->aXMLResponseData['HTML_ANSWER'] = (string) $oXMLResponse->HTML_ANSWER;
        }
    }
377724
public static function fromSearchResult($searchResult)
    {
        $item            = [];
        $item['id']      = $searchResult['id']['videoId'];
        $item['etag']    = null;
        $item['snippet'] = $searchResult['snippet'];
        
        return new self($item);
    }
401391
public function processResult(array $result) {
        list($result, $isRaw) = array_values($result);

        if(!$isRaw && is_string($result)) {
            return $this->createClone($result);
        }

        return $result;
    }
942167
public function validate(ValidationResult $validationResult) {
        if (!$this->owner->ID) return; // The object is new, won't be looping.
        if (!$this->owner->LanguageID) return; // The object has no parent, won't be looping.
        if (!$this->owner->isChanged('LanguageID')) return; // The parent has not changed, skip the check for performance reasons.

        // Walk the hierarchy upwards until we reach the top, or until we reach the originating node again.
        $node=$this->owner;
        while($node) {
            if ($node->LanguageID==$this->owner->ID) {
                // Hierarchy is looping.
                $validationResult->error(
                    _t(
                        'Hierarchy.InfiniteLoopNotAllowed',
                        'Infinite loop found within the "{type}" hierarchy. Please change the parent to resolve this',
                        'First argument is the class that makes up the hierarchy.',
                        array('type' => $this->owner->class)
                    ),
                    'INFINITE_LOOP'
                );
                break;
            }
            $node=$node->LanguageID ? $node->Language() : null;
        }

        // At this point the $validationResult contains the response.
    }
470860
public function parseResults(LoopResult $loopResult)
    {
        /** @var \Thelia\Model\ProductSaleElementsProductDocument $productSaleElementDocument */
        foreach ($loopResult->getResultDataCollection() as $productSaleElementDocument) {
            $row = new LoopResultRow($productSaleElementDocument);

            $row
                ->set("ID", $productSaleElementDocument->getId())
                ->set("PRODUCT_SALE_ELEMENTS_ID", $productSaleElementDocument->getProductSaleElementsId())
                ->set("PRODUCT_DOCUMENT_ID", $productSaleElementDocument->getProductDocumentId())
            ;

            $this->addOutputFields($row, $productSaleElementDocument);
            $loopResult->addRow($row);
        }

        return $loopResult;
    }
1060628
public function filterBySysLanguage($queryResult, $exceptions = []) {
    $result = $queryResult;

    if (is_string($exceptions)) {
      $exceptions = GeneralUtility::intExplode(',', $exceptions, true);
    }

    $sysLanguageUid = $this->languageService->getSysLanguageUid();

    if (!in_array($sysLanguageUid, $exceptions, true)) {
      $result = [];

      foreach ($queryResult as $object) {
        $uid = $object->getSysLanguageUid();

        if (isset($uid) && $uid == $sysLanguageUid) {
          $result[] = $object;
        }
      }
    }

    return $result;
  }
541313
private function refreshBatchesResult($batchesResult)
    {
        $refreshedBatchsResults = [];
        $mailchimp = $this->getContainer()->get('welp_mailchimp.mailchimp_master');
        foreach ($batchesResult as $key => $batch) {
            $batch = $mailchimp->get("batches/".$batch['id']);
            array_push($refreshedBatchsResults, $batch);
        }
        return $refreshedBatchsResults;
    }
829744
public function concat(NestableResult $that) : NestableResult
    {
        if (!$this->isError()) {
            return $that;
        }

        if (!$that->isError()) {
            return $this;
        }

        $result = new NestableResult(
            $this->outer->concat($that->outer),
            $this->inner + $that->inner // Overwrite for sequential arrays.
        );

        $result->fatal = $this->isFatal() || $that->isFatal();
        return $result; // Fatals are not recoverable.
    }
521807
public function onResult(\pq\Result $result = null) {
		if ($result && $result->status != \pq\Result::TUPLES_OK) {
			return $result;
		}
		
		$rowset = $this->getRowsetPrototype();
		if (is_callable($rowset)) {
			return $rowset($result);
		} elseif ($rowset) {
			return new $rowset($this, $result);
		}
		
		return $result;
	}
244017
public function recurseThroughResult(array $pathSegments): Result
    {
        if (count($pathSegments) === 0) {
            return $this;
        }

        $propertyName = array_shift($pathSegments);

        if (!isset($this->propertyResults[$propertyName])) {
            $newResult = new Result();
            $newResult->setParent($this);
            $this->propertyResults[$propertyName] = $newResult;
        }

        /** @var Result $result */
        $result = $this->propertyResults[$propertyName];
        return $result->recurseThroughResult($pathSegments);
    }
764105
public function getInputsFromResult($inputResult)
    {
        $input_array = [];

        if (!isset($inputResult['inputs'])) {
            throw new \Exception('Inputs Not Found');
        }

        foreach ($inputResult['inputs'] as $rawInput) {
            $input = new Input($rawInput);
            $input_array[] = $input;
        }

        return $input_array;
    }
1345497
public function dispatch($rawResult)
    {
        $this->arrayResult = json_decode($rawResult, true);
        $result = parent::dispatch($this->arrayResult);
        $this->rawResult = $rawResult;

        return $result;
    }
95998
public function dispatch($rawResult)
    {
        if (!is_array($rawResult)) {
            throw new \Exception('Response type must be an Array');
            exit;
        }

        $this->rawResult = $rawResult;
        $this->arrayResult = $rawResult;

        return $this->extractResult();
    }
338706
protected function initializeServer(LoopInterface $loop, $port)
    {
        $writer = new Stream("php://output");
        $logger = new Logger();
        $logger->addWriter($writer);

        return new WebSocketServer("tcp://0.0.0.0:{$port}", $loop, $logger);
    }
510832
public function createResultResponse($result, JsonRpcRequest $fromRequest = null) : JsonRpcResponse
    {
        return $this->createEmptyResponse($fromRequest)
            ->setResult($result);
    }