Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
DDDManager Class Reference

Manager for a Domain Driven Design approach. More...

Static Public Member Functions

static start ()
 Starts the domain manager.
 
static setDomain (string $domain)
 Sets the active domain.
 
static resetActiveDomain ()
 Removes the active domain.
 
static getDomains ()
 Returns an array of existing domains.
 
static hasDomains ()
 Check if there are any domains.
 
static domainExists (string $domain)
 Check if the domain exist.
 
static getActiveDomain ()
 Returns the active domain name.
 
static getActiveViewFolder ()
 Returns the active view folder.
 
static getViewNamespace ()
 Returns the active view namespace.
 
static getDomainBase (string $domain)
 Returns the base folder for a domain.
 
static createDomain (string $domainName)
 Creates a new domain.
 
static getBase ()
 Returns the domains base directory.
 
static setBase (string $base)
 Changes the base directory for domains.
 
static getDatabases ()
 Returns the databases with models in the current domain.
 

Static Private Member Functions

static getNamespace (string $type='controllers')
 
static createFolder (string $folder)
 
static updateClassesNamespace (string $oldBase, string $newBase)
 

Static Private Attributes

static string $base ='domains'
 
static string $activeDomain =''
 

Detailed Description

Manager for a Domain Driven Design approach.

Ubiquity\domains$DDDManager This class is part of Ubiquity

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
0.0.1

Definition at line 20 of file DDDManager.php.

Member Function Documentation

◆ createDomain()

static createDomain ( string  $domainName)
static

Creates a new domain.

Parameters
string$domainName
Returns
bool

Definition at line 134 of file DDDManager.php.

◆ createFolder()

static createFolder ( string  $folder)
staticprivate

Definition at line 146 of file DDDManager.php.

◆ domainExists()

static domainExists ( string  $domain)
static

Check if the domain exist.

Parameters
string$domain
Returns
bool

Definition at line 81 of file DDDManager.php.

◆ getActiveDomain()

static getActiveDomain ( )
static

Returns the active domain name.

Returns
string

Definition at line 90 of file DDDManager.php.

◆ getActiveViewFolder()

static getActiveViewFolder ( )
static

Returns the active view folder.

Returns
string

Definition at line 99 of file DDDManager.php.

◆ getBase()

static getBase ( )
static

Returns the domains base directory.

Returns
string

Definition at line 169 of file DDDManager.php.

◆ getDatabases()

static getDatabases ( )
static

Returns the databases with models in the current domain.

Returns
array

Definition at line 211 of file DDDManager.php.

◆ getDomainBase()

static getDomainBase ( string  $domain)
static

Returns the base folder for a domain.

Parameters
string$domain
Returns
string

Definition at line 124 of file DDDManager.php.

◆ getDomains()

static getDomains ( )
static

Returns an array of existing domains.

Returns
array

Definition at line 63 of file DDDManager.php.

◆ getNamespace()

static getNamespace ( string  $type = 'controllers')
staticprivate

Definition at line 24 of file DDDManager.php.

◆ getViewNamespace()

static getViewNamespace ( )
static

Returns the active view namespace.

Returns
string

Definition at line 111 of file DDDManager.php.

◆ hasDomains()

static hasDomains ( )
static

Check if there are any domains.

Returns
bool

Definition at line 71 of file DDDManager.php.

◆ resetActiveDomain()

static resetActiveDomain ( )
static

Removes the active domain.

Definition at line 53 of file DDDManager.php.

◆ setBase()

static setBase ( string  $base)
static

Changes the base directory for domains.

Do not use in production!

Parameters
string$base
Returns
bool

Definition at line 179 of file DDDManager.php.

◆ setDomain()

static setDomain ( string  $domain)
static

Sets the active domain.

Parameters
string$domain

Definition at line 45 of file DDDManager.php.

◆ start()

static start ( )
static

Starts the domain manager.

To use only if the domain base is different from domains.

Definition at line 36 of file DDDManager.php.

◆ updateClassesNamespace()

static updateClassesNamespace ( string  $oldBase,
string  $newBase 
)
staticprivate

Definition at line 153 of file DDDManager.php.

Field Documentation

◆ $activeDomain

string $activeDomain =''
staticprivate

Definition at line 22 of file DDDManager.php.

◆ $base

string $base ='domains'
staticprivate

Definition at line 21 of file DDDManager.php.


The documentation for this class was generated from the following file: