Add user message.

@param  string  $message Message text.
@param  boolean $isRaw Whether given text is raw. If not it will be processed with [[Yii::tr()]].
426626
public function message ($message, $isRaw = false)
		{
			Yii::$app->notification->message($message, $isRaw);
		}
761400
public function addMessage($message) {
        $migrationName = get_class($this);
        $this->messages[] = sprintf("%s:  %s\n", $migrationName, $message);
    }
266918
public function addErrorMessage($message, $params = array())
    {
        $message = $this->trans($message, $params);
        static::$messages[] = array(
            'type' => 'error',
            'bootstrapType' => 'danger',
            'message' => $message
        );
        static::$success = false;
    }
161166
private function sendRawMessage($message)
    {
        try {
            $this->mailer->raw($message, function ($message) {


                if (config('pigeon.dev.override')) {
                    $message->to(config('pigeon.dev.override_email'));
                } else {
                    $message->to($this->to);
                }

                // Set message parts
                $message->subject($this->subject)
                    ->cc($this->cc)
                    ->bcc($this->bcc)
                    ->replyTo($this->reply_to)
                    ->sender($this->sender);

                if (!empty($this->from)) {
                    $message->from($this->from);
                }

                // Set all attachments
                foreach ($this->attachments as $a) {
                    $message->attach($a['path'], $a['options']);
                }
            });
        } catch (ErrorException $e) {
            $msg = 'Pigeon could not send message: ' . $e->getMessage();
            $this->logger->error($msg);
            return false;
        } catch (\Swift_TransportException $e) {
            $msg = 'SMTP failure: ' . $e->getMessage();
            $this->logger->error($msg);
            return false;
        }

        return true;
    }
560880
public function addMessage(Message $message, $prepend = false)
    {
        if (!$prepend) {
            $this->appendMessage($message);
        } else {
            $this->prependMessage($message);
        }

        return $this;
    }
395781
protected function addMessage($status, $title, $message)
    {
        if (!empty($message) && is_array($message)) {
            $liStyle = 'style="margin-bottom: 0;"';

            $message = '<ul><li ' . $liStyle . '>' . implode('</li><li ' . $liStyle . '>', $message) . '</li></ul>';
        }

        $this->messageList[] = array($status, $title, $message);
    }
435276
public function sendByTopic($topic, $message, $isCondition = false)
    {
        $headers = $this->addRequestHeaders();
        $data = $this->buildData($topic, $message, $isCondition);

        try {
            $result = $this->client->post(
                $this->url,
                [
                    'headers' => $headers,
                    'json' => $data,
                ]
            );

            $json = $result->getBody();

            $this->setFeedback(json_decode($json, false, 512, JSON_BIGINT_AS_STRING));

        } catch (\Exception $e) {
            $response = ['success' => false, 'error' => $e->getMessage()];

            $this->setFeedback(json_decode(json_encode($response)));

        } finally {
            return $this->feedback;
        }
    }
1158180
private function updateMessage()
    {
        $this->message = $this->rawMessage;

        $dot = false;
        if ('.' === substr($this->message, -1)) {
            $this->message = substr($this->message, 0, -1);
            $dot = true;
        }

        if (null !== $this->document) {
            $this->message .= sprintf(' in %s', $this->document);
        }

        if ($this->snippet) {
            $this->message .= sprintf(' (near %s)', $this->snippet);
        }

        if ($dot) {
            $this->message .= '.';
        }
    }
1136886
public function send($raw_message = null)
    {
        // Set Optional Message Data
        if (!is_null($raw_message)) {
            $send_result = $this->sendRawMessage($raw_message);
        } else {
            $send_result = $this->sendMessage();
        }

        // Reset to default after send
        $this->restoreDefaultMessageType();

        return (bool) $send_result;
    }
106844
public function userMessage($message, $context = [])
    {
        if (isset($this->app) && $this->app instanceof \atk4\core\AppUserNotificationInterface) {
            $this->app->userNotification($message, $context);
        } elseif (isset($this->app) && $this->app instanceof \Psr\Log\LoggerInterface) {
            $this->app->log('warning', 'Could not notify user about: '.$message, $context);
        } else {
            $this->_echo_stderr("Could not notify user about: $message\n");
        }

        return $this;
    }
1353630
public function addMessage($item, $message = null)
    {
        if ($message === null || $message === '') {
            return $this;
        }
        if (!array_key_exists($item, $this->messages)) {
            $this->messages[$item] = array();
        }
        $this->messages[$item][] = $message;

        return $this;
    }
1004575
protected function addBodies(\Swift_Message $message, MailRenderedInterface $mailRendered): void
    {
        $textPlain = $mailRendered->getBody();
        $html = $mailRendered->getHtmlBody();

        if (null === $html) {
            $message->setBody($textPlain, 'text/plain');

            return;
        }

        $message->setBody($html, 'text/html');

        if (null !== $textPlain) {
            $message->addPart($textPlain, 'text/plain');
        }
    }
257691
public function addMessageInvalid($message_args)
    {
        $this->saveButtonId = null;
        $this->saveLabel    = null;

        parent::addMessage(func_get_args());
    }
334273
public function addValidationMessage($rule, $message)
    {
        if (($pos = strpos($rule, ':')) !== false) {
            $rule = substr($rule, 0, $pos);
        }

        $this->validationMessages[$rule] = $message;

        return $this;
    }
631998
public function add(ApnsPHP_Message $message)
	{
		$sMessagePayload = $message->getPayload();
		$nRecipients = $message->getRecipientsNumber();

		$nMessageQueueLen = count($this->_aMessageQueue);
		for ($i = 0; $i < $nRecipients; $i++) {
			$nMessageID = $nMessageQueueLen + $i + 1;
			$this->_aMessageQueue[$nMessageID] = array(
				'MESSAGE' => $message,
				'BINARY_NOTIFICATION' => $this->_getBinaryNotification(
					$message->getRecipient($i),
					$sMessagePayload,
					$nMessageID,
					$message->getExpiry()
				),
				'ERRORS' => array()
			);
		}
	}
1080603
public function addSuccessMessage($message, $params = array())
    {
        $message = $this->trans($message, $params);
        static::$messages[$message] = array(
            'type' => 'success',
            'bootstrapType' => 'success',
            'message' => $message
        );
    }
834838
public function addError($message, ...$args)
    {
        $message = $this->translate($message);
        if (!empty($args)) $message = vsprintf($message, $args);
        
        $this->errors[] = $message;
    }