/** * Finds all active domains matching the given host. * * Their order is determined by how well they match, best match first. * * @param string $host Host the domain should match with (eg. "localhost" or "www.neos.io") * @param boolean $onlyActive Only include active domains * @return array An array of matching domains * @api */ public function findByHost($host, $onlyActive = false) { $domains = $onlyActive === true ? $this->findByActive(true)->toArray() : $this->findAll()->toArray(); return $this->domainMatchingStrategy->getSortedMatches($host, $domains); }
/** * Finds all active domains matching the given host. * * Their order is determined by how well they match, best match first. * * @param string $host Host the domain should match with (eg. "localhost" or "www.typo3.org") * @param boolean $onlyActive Only include active domains * @return array An array of matching domains * @api */ public function findByHost($host, $onlyActive = FALSE) { $domains = $onlyActive === TRUE ? $this->findByActive(TRUE)->toArray() : $this->findAll()->toArray(); return $this->domainMatchingStrategy->getSortedMatches($host, $domains); }