getRDBRepository(EmailAddress::ENTITY_TYPE); if (!$repository instanceof EmailAddressRepository) { throw new RuntimeException(); } $this->repository = $repository; } /** * Get an email address entity by a string address. */ public function getByAddress(string $address): ?EmailAddress { return $this->repository->getByAddress($address); } }