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