Get message

If no "message" value has been set, this method will
set and return a default "message" value,
if any such value is available

@see getDefaultMessage()

@return string|null message or null if no message has been set
555629
public function getMessage() : ?string 
    {
        if ( ! $this->hasMessage()) {
            $this->setMessage($this->getDefaultMessage());
        }
        return $this->message;
    }
1254064
public function getMessage($rule, $default = NULL)
    {
        $messages = $this->getMessages();
        if (isset($messages[$rule])) {
            return $messages[$rule];
        } else {
            return $default;
        }
    }
413619
public function get(string $key, $default = null)
    {
        $messages = $this->all();

        return isset($messages[$key]) ? $messages[$key] : $default;
    }
1035692
public function getChat()
    {
        switch ($this->detectType())
        {
            case 'message':
                return $this->getMessage()->getChat();
            case 'callback_query':
                return $this->getCallbackQuery()->getMessage()->getChat();
            default:
                // nothing to return
                return null;
        }
    }
599721
public function getValue()
    {
        $value = $this->argument->getValue();
        return $value === null || $value === [] ? $this->argument->getDefaultValue() : $value;
    }
560778
protected function getText()
    {
        if ($this->value === null) {
            $text = $this->text;
        } elseif (is_array($this->value)) {
            $text = vsprintf($this->text, $this->value);
        } else {
            $text = sprintf($this->text, $this->value);
        }

        return $text;
    }
576455
public function getDefaultLanguage()
    {
        if (!$this->defaultLanguage) {
            $language = substr(setlocale(LC_ALL, 0), 0, 2);
            $languages = $this->getLanguages();
            $languageDefault = reset($languages);
            $language = $this->isValidLanguage($language) ? $language : $languageDefault;
            $this->setDefaultLanguage($language);
        }

        return $this->defaultLanguage;
    }
302410
protected function getDefaultMessage($code, $message): string
    {
        if ($code !== null && $message === null) {
            return ApiResponse::$statusTexts[$code]['message'];
        }

        return $message;
    }
747098
public function getErrorMessage()
    {
        if ($this->returnLetter instanceof ReturnLetter
                && $this->returnLetter->errorID !== 0) {
            return $this->returnLetter->error;
        }
    }
1010304
public function getDefaultValue()
    {
        if (null !== $this->defaultChildren) {
            $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : [];
            $defaults = [];
            foreach (array_values($this->defaultChildren) as $i => $name) {
                $defaults[null === $this->keyAttribute ? $i : $name] = $default;
            }

            return $defaults;
        }

        return $this->defaultValue;
    }
763760
public function getTemplate()
    {
        if ($this->expectedMessage) {
            return $this->getMessageTemplate();
        }

        if (!isset($this->template)) {
            return $this->getDefaultTemplate();
        }

        return $this->template;
    }
504877
public function getDefault()
    {
        $sDefault  = $this->oCi->config->item('languages_default');
        $oLanguage = $this->getByCode($sDefault);

        return !empty($oLanguage) ? $oLanguage : false;
    }
780017
public Object getDefault()
    {
        Object objDefault = super.getDefault();
        if (objDefault == null)
            objDefault = MessageConstants.INTRANET_QUEUE;
        return objDefault;
    }
1217537
public function getDefaultValue()
    {
        $default = $this->_default;

        if ($default && !$this->isScalar()) {
            $default = $default instanceof AnDomainAttributeInterface ? clone $default :
                        AnDomainAttribute::getInstance($this->_type);
        }

        return $default;
    }
354932
public String getDefaultMessage() {
    String defaultMessage = getFieldValue(DEFAULT_MESSAGE_KEY);
    if (defaultMessage == null) {
      defaultMessage = this.toString();
    }
    return defaultMessage;
  }
62280
public function getMessage()
    {
        $message = $this->messageBuilder->getMessage();

        if (!isset($message['from'])) {
            $this->setConfigFrom();
            $message = $this->messageBuilder->getMessage();
        }
        if ($this->variables) {
            $message['recipient-variables'] = json_encode($this->variables);
        }
        if (isset($this->{'o:native-send'})) {
            $message['o:native-send'] = $this->{'o:native-send'};
        }

        return $message;
    }
976156
public function getValue()
    {
        $value = $this->getModelValue();
        if (is_null($value)) {
            $value = $this->getDefaultValue();
        }

        return $value;
    }