class DomainRepository extends Repository (View source)

The Site Repository

Properties

protected DomainMatchingStrategy $domainMatchingStrategy
protected Bootstrap $bootstrap
protected array<string,string> $defaultOrderings

Methods

Domain[]
findByHost(string $hostname, bool $onlyActive = false)

Finds all active domains matching the given hostname.

Domain|null
findOneByHost(string $hostname, bool $onlyActive = false)

Find the best matching active domain for the given hostname.

Domain|null
findOneByActiveRequest()

No description

Domain[]
findByActive(bool $active)

No description

Domain[]
findBySite(Site $site)

No description

Domain[]
findByHostname(string $hostname)

No description

Details

Domain[] findByHost(string $hostname, bool $onlyActive = false)

Finds all active domains matching the given hostname.

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

Parameters

string $hostname

Hostname the domain should match with (eg. "localhost" or "www.neos.io")

bool $onlyActive

Only include active domains

Return Value

Domain[]

An array of matching domains

Domain|null findOneByHost(string $hostname, bool $onlyActive = false)

Find the best matching active domain for the given hostname.

Parameters

string $hostname

Hostname the domain should match with (eg. "localhost" or "www.neos.io")

bool $onlyActive

Only include active domains

Return Value

Domain|null

Domain|null findOneByActiveRequest()

No description

Return Value

Domain|null

Domain[] findByActive(bool $active)

No description

Parameters

bool $active

Return Value

Domain[]

Domain[] findBySite(Site $site)

No description

Parameters

Site $site

Return Value

Domain[]

Domain[] findByHostname(string $hostname)

No description

Parameters

string $hostname

Return Value

Domain[]