public function getByAlpha2($alpha2) { if (!preg_match('/^[a-zA-Z]{2}$/', $alpha2)) { throw new \DomainException('Not a valid alpha2: ' . $alpha2); } return $this->get($alpha2); }