Neos\Neos\Domain\Repository\DomainRepository::findByHost PHP Method

findByHost() public method

Their order is determined by how well they match, best match first.
public findByHost ( string $hostname, boolean $onlyActive = false ) : array
$hostname string Hostname the domain should match with (eg. "localhost" or "www.neos.io")
$onlyActive boolean Only include active domains
return array An array of matching domains
    public function findByHost($hostname, $onlyActive = false)
    {
        $domains = $onlyActive === true ? $this->findByActive(true)->toArray() : $this->findAll()->toArray();
        return $this->domainMatchingStrategy->getSortedMatches($hostname, $domains);
    }