Neos.Neos/Classes/Domain/Repository/DomainRepository.php
public function findByHost($hostname, $onlyActive = false)
    {
        $domains = $onlyActive === true ? $this->findByActive(true)->toArray() : $this->findAll()->toArray();
        return $this->domainMatchingStrategy->getSortedMatches($hostname, $domains);
    }
public function findByHost($hostname, $onlyActive = false)
    {
        $domains = $onlyActive === true ? $this->findByActive(true)->toArray() : $this->findAll()->toArray();
        return $this->domainMatchingStrategy->getSortedMatches($hostname, $domains);
    }
public function findByHost ( $ hostname , $ onlyActive = false ) { $ domains = $ onlyActive === true ? $ this -> findByActive ( true ) -> toArray ( ) : $ this -> findAll ( ) -> toArray ( ) ; return $ this -> domainMatchingStrategy -> getSortedMatches ( $ hostname , $ domains ) ; }
Finds all active domains matching the given hostname.

Their order is determined by how well they match, best match first.

@param string $hostname Hostname 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
Finds all active domains matching the given hostname .