/** * Creates an array from a status object. * Used for example to transfer the message as json. * * @param StatusInterface $status * @return array */ public function transformStatusToArray(StatusInterface $status) { $arrayStatus = array(); $arrayStatus['severity'] = htmlspecialchars($status->getSeverity()); $arrayStatus['title'] = htmlspecialchars($status->getTitle()); $arrayStatus['message'] = htmlspecialchars($status->getMessage()); return $arrayStatus; }
/** * @param StatusInterface $statusMessage */ protected function outputStatusMessage(StatusInterface $statusMessage) { $subject = strtoupper($statusMessage->getSeverity()) . ': ' . $statusMessage->getTitle(); switch ($statusMessage->getSeverity()) { case 'error': $subject = '<error>' . $subject . '</error>'; break; default: } $this->output->outputLine($subject); $this->output->outputLine(wordwrap($statusMessage->getMessage())); }