class Domain

Properties

static $instance
string $name
string $description
string $project_folder

Methods

__construct(array $data)

Domain constructor.

static void
init()

Init and setup the Document object

static Domain
get()

Return the Document object instance. Document object is a singleton

string|null
getHost()

Get the current host.

string
getOrigin()

Get the origin URL.

array
getLanguages()

Get the available languages for the domain.

string
getDefaultLanguage()

Get the default language for the domain.

Collection
getModules()

Get the project active modules

bool
hasModule(string $module)

Get if a project has a module

array
getConnectionsConfig()

Get all registered connections

array
getConnectionConfig(string $connection_name)

Get a specific registered connection config

Connection
getOwnConnection()

Get a connection to the domain database

Details

at line 21
__construct(array $data)

Domain constructor.

Parameters

array $data

The data array containing project folder information.

at line 33
static void init()

Init and setup the Document object

Return Value

void

at line 66
static Domain get()

Return the Document object instance. Document object is a singleton

Return Value

Domain

singleton instance

at line 75
string|null getHost()

Get the current host.

Return Value

string|null

The current host.

at line 84
string getOrigin()

Get the origin URL.

Return Value

string

The origin URL.

at line 93
array getLanguages()

Get the available languages for the domain.

Return Value

array

The list of available languages.

at line 102
string getDefaultLanguage()

Get the default language for the domain.

Return Value

string

The default language.

at line 111
Collection getModules()

Get the project active modules

Return Value

Collection

The collection of active modules.

at line 124
bool hasModule(string $module)

Get if a project has a module

Parameters

string $module

The module to check for

Return Value

bool

True if the project has the module, false otherwise.

at line 133
array getConnectionsConfig()

Get all registered connections

Return Value

array

List of registered connections

at line 147
array getConnectionConfig(string $connection_name)

Get a specific registered connection config

Parameters

string $connection_name

Return Value

array

Connection config

at line 156
Connection getOwnConnection()

Get a connection to the domain database

Return Value

Connection

to the domain database.