messages = $messages; $this->recent = $recent; $this->uidvalidity = $uidvalidity; $this->flags = $flags; } /** * @return int total amount of messages */ public function getMessages(): int { return $this->messages; } /** * @return int amount of recent messages */ public function getRecentMessages(): int { return $this->recent; } /** * @return int */ public function getUidvalidity(): int { return $this->uidvalidity; } /** * @return array */ public function getFlags(): array { return $this->flags; } /** * @param string $flag * * @return bool */ public function hasFlag(string $flag): bool { return array_key_exists($flag, $this->flags); } }