Bluz\Messages\Messages::popAll PHP Method

popAll() public method

Pop all messages
public popAll ( ) : array
return array
    public function popAll()
    {
        if (!$this->getMessagesStore()) {
            return $this->createEmptyMessagesStore();
        }
        $messages = $this->getMessagesStore()->getArrayCopy();
        $this->reset();
        return $messages;
    }