@param string $message

@return string
170960
protected function prefixMessage($message) {
        if ($this->prefix !== null) {
            return s('%s: %s', $this->prefix, $message);
        }

        return $message;
    }
967034
protected function getSchemaForMessage($message)
    {
        // Form schema messages treat simple strings as plain text, so nest for html messages
        $value = $message['message'];
        if ($message['messageCast'] === ValidationResult::CAST_HTML) {
            $value = ['html' => $message];
        }
        return [
            'value' => $value,
            'type' => $message['messageType'],
            'field' => empty($message['fieldName']) ? null : $message['fieldName'],
        ];
    }
554929
public static function t($message)
    {
        if (!isset(static::$_handlers[static::$_domain])) {
            static::loadHandler('Horde_Translation_Handler_Gettext');
        }
        return static::$_handlers[static::$_domain]->t($message);
    }
774220
public function resolvePackage(string $message): ?string
    {
        $match = Strings::match($message, self::PACKAGE_NAME_PATTERN);
        if (! isset($match['package'])) {
            return Package::UNKNOWN;
        }

        return $this->packageAliases[$match['package']] ?? $match['package'];
    }
746294
protected function filterHtml( $message )
	{
		$message = strip_shortcodes( $message );
		$message = wptexturize( $message );
		$message = wpautop( $message );
		$message = str_replace( ['&lt;&gt; ', ']]>'], ['', ']]&gt;'], $message );
		$message = stripslashes( $message );
		return $message;
	}
723078
public function message($message=null) {
        if(is_null($message)) {
            return $this->message;
        }
        $this->message = $message;
    }
1109142
protected function getExceptionAttribute($message)
    {
        $message = substr($message, strpos($message, '"') + 1);

        return substr($message, 0, strpos($message, '"'));
    }
206831
public static function decodeMessage(string $message): Message
    {
        $offset = 0;
        $header = self::decodeHeader($message, $offset);
        $messageObject = new Message($header);
        $messageObject->setQuestions(self::decodeResourceRecords($message, $header->getQuestionCount(), $offset, true));
        $messageObject->setAnswers(self::decodeResourceRecords($message, $header->getAnswerCount(), $offset));
        $messageObject->setAuthoritatives(self::decodeResourceRecords($message, $header->getNameServerCount(), $offset));
        $messageObject->setAdditionals(self::decodeResourceRecords($message, $header->getAdditionalRecordsCount(), $offset));

        return $messageObject;
    }
851131
public function translate($message, ... $parameters): string {
    $count = $parameters[0] ?? 0;
    $params = $parameters[1] ?? [];
    list($domain, $m) = $this->extractDomainAndMessage($message);
    $texts = Arrays::get($this->loader->getTexts(), $domain, []);
    $parts = explode(".", $m);
    if(count($parts) === 1) {
      $parts = [$m];
    }
    $text = $this->multiLevelTrans($parts, $texts);
    if($text === "") {
      $this->onUntranslated($message);
      return $message;
    }
    if($this->messageSelector->isMultiChoice($text)) {
      $text = $this->messageSelector->choose($text, $count);
    }
    $params["count"] = $count;
    foreach($params as $key => $value) {
      $text = str_replace("%$key%", $value, $text);
    }
    return $text;
  }
73678
protected static function ctcpQuote($message)
    {
        // First comes low-level quoting.
        $quoting = array(
            "\000"  => "\0200",
            "\n"    => "\020n",
            "\r"    => "\020r",
            "\020"  => "\020\020",
        );
        $message = strtr($message, $quoting);

        // Next some CTCP-level quoting and we're done.
        $quoting = array(
            "\001"  => "\\a",
            "\\"    => "\\\\",
        );
        $message = strtr($message, $quoting);
        return $message;
    }
1235031
public static function createFromRaw($message)
    {
        $eventStart = strpos($message, 'Event: ') + 7;
        $eventEnd = strpos($message, Message::EOL, $eventStart);
        if ($eventEnd === false) {
            $eventEnd = strlen($message);
        }
        $name = substr($message, $eventStart, $eventEnd - $eventStart);
        $parts = explode('_', $name);
        $totalParts = count($parts);
        for ($i = 0; $i < $totalParts; $i++) {
            $parts[$i] = ucfirst($parts[$i]);
        }
        $name = implode($parts, '');
        $className = '\\PAMI\\Message\\Event\\' . $name . 'Event';
        if (class_exists($className, true)) {
            return new $className($message);
        }
        return new UnknownEvent($message);
    }
1232812
private function formatMessage($message)
    {
        $formattedMessage = implode('', (array)$message);
        $formattedMessage = str_replace(PHP_EOL, '', $formattedMessage);
        $formattedMessage = strip_tags($formattedMessage);
        $formattedMessage = preg_replace([
            '/\\x1b[[][^A-Za-z]*[A-Za-z]/',
            '/[-=]{2,}/',
        ], '', $formattedMessage);

        return $formattedMessage !== null
            ? trim($formattedMessage, " \t\n\r\0\x0B-=")
            : (string)$formattedMessage;
    }
1023936
protected function formatMessage($message)
    {
        $traces = array();
        foreach ($this->getBacktrace() as $trace) {
            $traces[] = "in {$trace['file']}:{$trace['line']}";
        }

        $str = "[" . date('Y-m-d H:i:s', time()) . "]#" .  $this->getUserIp() . "# - " . $message;
        $str .= (empty($traces) ? '' : "\n    " . implode("\n    ", $traces));
        return $str;
    }
433381
protected function handleMessage($message)
    {
        if (!is_null($response = $this->call('message.*', array($message)))) {
            return $response;
        }

        return $this->call("message.{$message['MsgType']}", array($message));
    }
210723
private function summarize($message)
    {
        $message = ltrim($message, "\n");
        if ($newLinePos = strpos($message, "\n")) {
            $message = substr($message, 0, $newLinePos);
        }

        return rtrim($message);
    }
773717
protected function stringifyMessage($message)
    {
        if (is_array($message) || is_object($message) || is_bool($message)) {
            return (string)var_export($message, true);
        }
        return (string)$message;
    }
1243968
public function wrapAndSerialize($message)
    {
        $envelope = $this->envelopeFactory->wrapMessageInEnvelope($message);

        $serializedMessage = $this->objectSerializer->serialize($message);

        return $this->objectSerializer->serialize($envelope->withSerializedMessage($serializedMessage));
    }