protected function findDomainsByHostnamePattern($hostnamePattern)
    {
        return array_filter(
            $this->domainRepository->findAll()->toArray(),
            function ($domain) use ($hostnamePattern) {
                return fnmatch($hostnamePattern, $domain->getHostname());
            }
        );
    }