Outputs the given Result object in a human-readable way

@param Result $result
@return void
505052
private function renderResult(Result $result)
    {
        if ($result->hasNotices()) {
            /** @var Notice $notice */
            foreach ($result->getNotices() as $notice) {
                if (!empty($notice->getTitle())) {
                    $this->outputLine('<b>%s</b>: %s', [$notice->getTitle(), $notice->render()]);
                } else {
                    $this->outputLine($notice->render());
                }
            }
        }

        if ($result->hasErrors()) {
            /** @var Error $error */
            foreach ($result->getErrors() as $error) {
                $this->outputLine('<error>ERROR: %s</error>', [$error->render()]);
            }
        }
        if ($result->hasWarnings()) {
            /** @var Warning $warning */
            foreach ($result->getWarnings() as $warning) {
                if (!empty($warning->getTitle())) {
                    $this->outputLine('<b>%s</b>: <comment>%s</comment>', [$warning->getTitle(), $warning->render()]);
                } else {
                    $this->outputLine('<comment>%s</comment>', [$warning->render()]);
                }
            }
        }
        if (!$result->hasErrors() && !$result->hasWarnings()) {
            $this->outputLine('<success>OK</success>');
        }
    }
69971
public function preview($results)
    {
        $table = $results['__table'];
        unset($results['__table']);

        $this->command->info('I will insert this values into <comment>' . $table . '</comment> table');
        $this->command->table(['column', 'value'], $this->arrayToTable($results));
    }
767550
function printResults()
    {
        $results = $this->resultList();
        foreach ( $results as $result )
        {
            $this->display( $result );
        }
    }
851491
function setViewResult( $result, $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        $this->ViewResult[$view] = $result;
    }
917791
protected function processPlayers($data, Result &$result)
    {

        // We need to split the data at the pipe
        $players = explode('|', $data);

        // Iterate over the channels
        foreach ($players as $player) {
            // Offload the parsing for these values
            $properties = $this->processProperties($player);

            // Iterate over the properties
            foreach ($properties as $key => $value) {
                $result->addPlayer($key, $value);
            }
        }

        unset($data, $player, $players, $properties, $key, $value);
    }
747051
private function transformResult($result)
    {
        if ($this->actualDriver() === self::DRIVER_PREDIS && $result instanceof Status) {
            $result = $result->getPayload() === 'OK';
        }
        return $result;
    }
644265
private static function treatment($result)
    {
        if (is_string($result)) {
            echo $result;
        } elseif ($result instanceof Views) {
            View::show($result);
        }
    }
63685
public function output($flags = 0x00003) {
    if (($flags & self::OUTPUT_HEADER) == self::OUTPUT_HEADER) {
      $this->sendHeaders();
    }
    
    if ($this->outputClosure instanceof \Closure) {
      $c = $this->outputClosure;
      $c();
      return;
    }
    
    if (($flags & self::OUTPUT_BODY) == self::OUTPUT_BODY) {
      print $this->body;
    }
  }
845421
public function process(Request $request, Result $result)
    {
        $this->setRequest($request);
        $this->setResult($result);
        $this->respond();
    }
864078
protected static function parseString(&$data, &$result)
    {
        // Character string type
        $data = self::parseCommon($data, $stringData);
        $result[] = [
            'string (' . self::$len . ')',
            $stringData, ];
    }
634032
static public function printResults(array $results, string $format = 'text') {
        if ($format == 'tsv') {
            echo "subject\tmessage\tproperty\tvalue\n";
            foreach ($results as $i) {
                echo $i . "\n";
            }
        } else {
            $len = array(9, 9, 10, 7);
            foreach ($results as $i) {
                $len[0] = max($len[0], mb_strlen($i->resUri) + 2);
                $len[1] = max($len[1], mb_strlen($i->message) + 2);
                $len[2] = max($len[2], mb_strlen($i->property) + 2);
                $len[3] = max($len[3], mb_strlen($i->value) + 2);
            }
            $format = sprintf("%% %ds%% %ds%% %ds%% %ds\n", $len[0], $len[1], $len[2], $len[3]);
            printf($format, 'subject', 'message', 'property', 'value');
            foreach ($results as $i) {
                printf($format, $i->resUri, $i->message, $i->property, $i->value);
            }
        }
    }
590530
protected function processResult($result)
    {
        $output = Helper::objectToArray($result);

        if (! is_array($output)) {
            throw new Error\Api($output);
        }

        if (isset($output['result'])) {
            return $output;
        }

        if (
            isset($output['request']) &&
            $output['request']['result'] != 1 &&
            $output['request']['result'] !== 'TRUE') {
            throw new Error\Api($output['request']['errorId'] . ' - ' . $output['request']['errorMessage']);
        }

        return $output;
    }
122357
protected function processDetails(Buffer &$buffer, Result &$result)
    {

        // We go until we hit an empty key
        while ($buffer->getLength()) {
            $key = $buffer->readString();
            if (strlen($key) == 0) {
                break;
            }
            $result->add($key, utf8_encode($buffer->readString()));
        }
    }
448754
protected function response($result)
    {
        $response = $this->container->get(Application::RESPONSE);

        if ($result instanceof ResponseInterface)
        {
            return $result;
        }

        $response->stream()->write($result);

        return $response;
    }
537204
function output_as_xml($results){
		LogMaster::log("Edit operation finished",$results);
		ob_clean();
		header("Content-type:text/xml");
		echo "<?xml version='1.0' ?>";
		echo "<data>";
		for ($i=0; $i < sizeof($results); $i++)
			echo $results[$i]->to_xml();
		echo "</data>";
	}
1195086
public function result(string $testName, int $result, string $message): void
	{
		$outputs = [
			Test::PASSED => Dumper::color('green', '✔ ' . $testName),
			Test::SKIPPED => Dumper::color('olive', 's ' . $testName) . '(' . $message . ')',
			Test::FAILED => Dumper::color('red', '✖ ' . $testName) . "\n" . $this->indent($message, 3) . "\n",
		];
		echo $this->indent($outputs[$result], 2) . PHP_EOL;
	}
698397
public function output()
    {
        // Attach appropriate X-Include-JavaScript and X-Include-CSS headers
        if (Director::is_ajax()) {
            Requirements::include_in_response($this);
        }

        if ($this->isRedirect() && headers_sent()) {
            $this->htmlRedirect();
        } else {
            $this->outputHeaders();
            $this->outputBody();
        }
    }