public function getMessages($types)
    {
        $result = array();

        foreach ($types as $type) {
            $storage = $this->getStorageByMessageType($type);
            if ($storage) {
                $result[] = $storage->getMessages(true);
            }
        }

        return $result;
    }