src/Web/Result.php
public function getMessages($format = self::Format_Array)
    {
        $messages = array();

        // Collect the messages.
        if (($message = $this->getExceptionMessage()) !== '') {
            $messages[] = $message;
        }
        $messages = array_merge($messages, $this->getErrors(self::Format_PlainTextArray));
        $messages = array_merge($messages, $this->getWarnings(self::Format_PlainTextArray));
        $messages = array_merge($messages, $this->getNotices(self::Format_PlainTextArray));

        return $this->formatMessages($messages, $format);
    }
public function getMessages($format = self::Format_Array)
    {
        $messages = array();

        // Collect the messages.
        if (($message = $this->getExceptionMessage()) !== '') {
            $messages[] = $message;
        }
        $messages = array_merge($messages, $this->getErrors(self::Format_PlainTextArray));
        $messages = array_merge($messages, $this->getWarnings(self::Format_PlainTextArray));
        $messages = array_merge($messages, $this->getNotices(self::Format_PlainTextArray));

        return $this->formatMessages($messages, $format);
    }
public function getMessages ( $ format = self :: Format_Array ) { $ messages = array ( ) ; // Collect the messages. if ( ( $ message = $ this -> getExceptionMessage ( ) ) !== '' ) { $ messages [ ] = $ message ; } $ messages = array_merge ( $ messages , $ this -> getErrors ( self :: Format_PlainTextArray ) ) ; $ messages = array_merge ( $ messages , $ this -> getWarnings ( self :: Format_PlainTextArray ) ) ; $ messages = array_merge ( $ messages , $ this -> getNotices ( self :: Format_PlainTextArray ) ) ; return $ this -> formatMessages ( $ messages , $ format ) ; }
If the result contains any errors or warnings, a list of verbose messages
is returned.

@param int $format
The format in which to return the messages:
- Result::Format_PlainTextArray: an array of strings
- Result::Format_FormattedText: a plain text string with all messages
on its own line indented by a '*'.
- Result::Format_Html: a html string with all messages in an
unordered HTML list

@return string|string[]
An string or array with textual messages that can be used to inform the
user.
If the result contains any errors or warnings a list of verbose messages is returned .