src/Publisher/MessageCapturer.php
public function fetchMessages($clear = true)
    {
        $messages = $this->messages;
        if ($clear) {
            $this->clear();
        }

        return $messages;
    }
public function fetchMessages($clear = true)
    {
        $messages = $this->messages;
        if ($clear) {
            $this->clear();
        }

        return $messages;
    }
public function fetchMessages ( $ clear = true ) { $ messages = $ this -> messages ; if ( $ clear ) { $ this -> clear ( ) ; } return $ messages ; }
Fetch the captured messages.

@param bool $clear Clear the stored messages
@return Message[]
Fetch the captured messages .