Display a status.

@param string|null $info
@param string|null $details
@param string|null $origin
@param float|null  $time
179343
public function display($info = null, $details = null, $origin = null, $time = null)
    {
        if (!$this->hasCommand()) {
            return;
        }

        // Build handle
        $comment = $this->getTree().$this->getFork();

        // Add details
        if ($info) {
            $comment .= ' <info>'.$info.'</info>';
        }
        if ($details) {
            $comment .= ' <comment>('.$details.')</comment>';
        }
        if ($origin) {
            $comment .= ' fired by <info>'.$origin.'</info>';
        }
        if ($time) {
            $comment .= ' [~'.$time.'s]';
        }

        $this->command->writeln($comment);
    }
406888
function(details) {
        this.id = details.jobId;
        this.status = details.status;
        this.response = details.response;
        this.error = details.error;
    }
952985
public static function SetStatus(int $status, bool $exit = false) :void
        {
            if (!HttpStatusCode::IsSupported($status)) {
                throw new \Error("Status code {$status} is not supported");
            }

            self::$status = $status;
            self::AddHeader('Status', $status);

            if ($exit) {
                self::ApplyHeaders();
                exit();
            }
        }
248790
private function setStatus( $status, $store = true, $reason = null )
    {
        $this->logStatusChange( $status, $reason );
        $this->setAttribute( 'status', $status );
        if ( $store )
        {
            $this->store( array( 'status' ) );
        }
    }
596494
private void sendNSStatus(IConnection conn, String statusCode, String description, String name, Number streamId) {
        StreamService.sendNetStreamStatus(conn, statusCode, description, name, Status.STATUS, streamId);
    }
1152373
private function postInfo(
        string $context,
        string $position,
        Post $post,
        int $count
    ): string {
        return $post->info($this->posts->args[$context][$position])->list();
    }
1159292
protected function availability_completed_by(\core_availability\info $info, $starttime, $endtime) {

        $dateconditions = $info->get_availability_tree()->get_all_children('\availability_date\condition');
        foreach ($dateconditions as $condition) {
            // Availability API does not allow us to check from / to dates nicely, we need to be naughty.
            $conditiondata = $condition->save();

            if ($conditiondata->d === \availability_date\condition::DIRECTION_FROM &&
                    $conditiondata->t > $endtime) {
                // Skip this activity if any 'from' date is later than the end time.
                return false;

            } else if ($conditiondata->d === \availability_date\condition::DIRECTION_UNTIL &&
                    ($conditiondata->t < $starttime || $conditiondata->t > $endtime)) {
                // Skip activity if any 'until' date is not in $starttime - $endtime range.
                return false;
            } else if ($conditiondata->d === \availability_date\condition::DIRECTION_UNTIL &&
                    $conditiondata->t < $endtime && $conditiondata->t > $starttime) {
                return true;
            }
        }

        // This can be interpreted as 'the activity was available but we don't know if its expected completion date
        // was during this period.
        return null;
    }
1283274
function statusText()
    {
        if ( $this->Progress == 100 )
        {
            return self::STATUS_COMPLETE;
        }

        if ( $this->Progress < 0 )
        {
            return self::STATUS_NOT_STARTED;
        }

        $timeSinceLastReport = time() - $this->LastReportTimestamp;

        if ( $timeSinceLastReport <= self::STATUS_ACTIVE_TIMEOUT )
        {
            return self::STATUS_ACTIVE;
        }

        if ( $timeSinceLastReport <= self::STATUS_DELAYED_TIMEOUT )
        {
            return self::STATUS_DELAYED;
        }

        return self::STATUS_DEAD;
    }
271519
protected function displayStatus()
    {
        $name = $this->getName();
        $description = $this->getDescription();
        $time = $this->timer->getTime($this);
        $event = $this->event ? $this->event->getName() : null;

        $this->explainer->display($name, $description, $event, $time);
    }
767800
public static function status($code = null, $trigger = true)
    {
        if (self::$httpCode === null) {
            self::$httpCode = \UtilsStatusCode();
        }

        if ($code === null || self::$httpCode === $code) {
            return self::$httpCode;
        } elseif (headers_sent() || $code < 100 || $code > 599) {
            return false;
        }

        header('X-PHP-Response-Code: ' . $code, true, $code);

        $lastCode = self::$httpCode;
        self::$httpCode = $code;

        if ($trigger) {
            App::trigger('changestatus', array($code, null));
        }

        return $lastCode;
    }
709578
function createRequestStatus() {
    $cnt = count( $this->requeststatus );
    if( 0 >= $cnt )
      return;
    $output = null;
    foreach( $this->requeststatus as $rstat ) {
      $attributes = $this->_createParams( $rstat['params'], array( 'LANGUAGE' ));
      $content    = number_format( (float) $rstat['value']['statcode'], 2, '.', '');
      $content   .= ';'.$this->_strrep( $rstat['value']['text'] );
      if( isset( $rstat['value']['extdata'] ))
        $content .= ';'.$this->_strrep( $rstat['value']['extdata'] );
      $output    .= $this->_createElement( 'REQUEST-STATUS', $attributes, $content );
    }
    return $output;
  }
759119
function getStatusReason()
    {
        if ($this->statReason)
            return $this->statReason;

        ($reason = \Poirot\Http\Response\getStatReasonFromCode($this->getStatusCode()))
            ?: $reason = 'Unknown';

        return $reason;
    }
533629
function showStatus() {
	// http://ibl.api.bbci.co.uk/ibl/v1/status
	var query = nitro.newQuery();
	nitro.make_request(ibl.host,ibl.getStatus,ibl_key,query,{},function(obj){
		console.log(JSON.stringify(obj,null,2));
		return false;
	});
}
244341
public function displayStatus()
    {
        // Recompose strategy and implementation from
        // the class name
        $components = get_class($this);
        $components = explode('\\', $components);

        $name = Arr::get($components, count($components) - 1);
        $strategy = Arr::get($components, count($components) - 2);

        $parent = ucfirst($strategy);
        $concrete = str_replace('Strategy', null, $name);
        $details = $this->getDescription();

        $this->explainer->display($parent.'/'.$concrete, $details);

        return $this;
    }
514638
public static function nfoTime($s)
    {
        self::printMessage('<' . Carbon::now()->toTimeString() . '> ' . self::withCallsite($s), 'info');
    }
370616
public function displaySubscriptionDetails($sub)
	{
		echo 'ID:            '.$sub->getId().PHP_EOL;
		echo 'Name:          '.$sub->getName().PHP_EOL;
		echo 'Status:        '.$sub->getStatus().PHP_EOL;
		echo 'Created at:    '.(is_null($sub->getCreatedAt()) ? 'null' : date('r', $sub->getCreatedAt())).PHP_EOL;
		echo 'Last request:  '.(is_null($sub->getLastRequest()) ? 'null' : date('r', $sub->getLastRequest())).PHP_EOL;
		echo 'Last success:  '.(is_null($sub->getLastSuccess()) ? 'null' : date('r', $sub->getLastSuccess())).PHP_EOL;
		echo 'Output Type:   '.$sub->getOutputType().PHP_EOL;

		echo 'Output Params:'.PHP_EOL;
		foreach ($sub->getOutputParams() as $key => $val) {
			echo '  '.$key.' = '.$val.PHP_EOL;
		}
	}
285641
private function halt(string $status, string $reason): void
    {
        header('HTTP/1.0 '. $status);
        header('Connection: close');
        header('Content-Type: none');

        $xHaltMessage = sprintf('X-Halt: Reason=%s, Ip=%s, Url:%s', $reason,
            Util::getClientIp(), Util::getCurrentUrl());

        header($xHaltMessage);
        header_remove('X-Powered-By');

        $this->logger->logFail(new AppException($xHaltMessage));

        print '<!---->';

        exit(1); // boom!
    }