class Domain implements CacheAwareInterface (View source)

Domain Model of a Domain.

It is used to connect a site root node to a specific hostname.

Properties

protected string $hostname
protected string $scheme
protected int $port
protected Site $site
protected bool $active

If domain is active

Methods

void
setHostname(string $hostname)

Sets the hostname

string
getHostname()

Returns the hostname

void
setScheme(string $scheme = null)

Sets the scheme for the domain

?string
getScheme()

Returns the scheme for this domain

void
setPort(int $port = null)

Sets the port for the domain

?int
getPort()

Returns the port for this domain

void
setSite(Site $site)

Sets the site this domain is pointing to

getSite()

Returns the site this domain is pointing to

void
setActive(bool $active)

Sets if the domain is active

bool
getActive()

Returns if the domain is active

void
onPostFlush()

Internal event handler to forward domain changes to the "siteChanged" signal

string
getCacheEntryIdentifier()

{@inheritdoc}

string
__toString()

Returns a URI string representation of this domain

Details

void setHostname(string $hostname)

Sets the hostname

Parameters

string $hostname

Return Value

void

string getHostname()

Returns the hostname

Return Value

string

void setScheme(string $scheme = null)

Sets the scheme for the domain

Parameters

string $scheme

Scheme for the domain

Return Value

void

?string getScheme()

Returns the scheme for this domain

Return Value

?string

The scheme

void setPort(int $port = null)

Sets the port for the domain

Parameters

int $port

Port for the domain

Return Value

void

?int getPort()

Returns the port for this domain

Return Value

?int

The port

void setSite(Site $site)

Sets the site this domain is pointing to

Parameters

Site $site

The site

Return Value

void

Site getSite()

Returns the site this domain is pointing to

Return Value

Site

void setActive(bool $active)

Sets if the domain is active

Parameters

bool $active

If the domain is active

Return Value

void

bool getActive()

Returns if the domain is active

Return Value

bool

If active or not

void onPostFlush()

Internal event handler to forward domain changes to the "siteChanged" signal

Return Value

void

string getCacheEntryIdentifier()

{@inheritdoc}

Return Value

string

string __toString()

Returns a URI string representation of this domain

Return Value

string

This domain as a URI string