AbstractModule
extends AbstractApplication
in package
implements
ModuleInterface
AbstractYes
Abstract module class
Tags
Table of Contents
Interfaces
- ModuleInterface
- Pop router interface
Properties
- $application : Application|null
- Application
- $config : mixed
- Application config
- $fullName : string|null
- Full Name (Human-readable, e.g., "My Application")
- $name : string|null
- Name (Slug, e.g. "my-app")
- $version : string|null
- Version
Methods
- addConfigValue() : AbstractApplication
- Add new value to config
- application() : Application
- Get application
- config() : mixed
- Access application config
- deleteConfigValue() : AbstractApplication
- Replace existing value in config
- getFullName() : string
- Get full name
- getName() : string
- Get name
- getVersion() : string
- Get version
- hasFullName() : bool
- Determine if the full name is set
- hasName() : bool
- Determine if the name is set
- hasVersion() : bool
- Determine if version has been set
- isRegistered() : bool
- Determine if the module has been registered with an application object
- load() : AbstractApplication
- Optional method that can be used to load custom operations/configurations for an application to run
- mergeConfig() : AbstractApplication
- Merge new or altered config values with the existing config values
- register() : AbstractModule
- Register module
- registerConfig() : AbstractApplication
- Register a new configuration with the application
- setFullName() : static
- Set full name
- setName() : static
- Set name
- setVersion() : static
- Set version
- updateConfigValue() : AbstractApplication
- Update existing value in config
Properties
$application
Application
protected
Application|null
$application
= null
$config
Application config
protected
mixed
$config
= null
$fullName
Full Name (Human-readable, e.g., "My Application")
protected
string|null
$fullName
= null
$name
Name (Slug, e.g. "my-app")
protected
string|null
$name
= null
$version
Version
protected
string|null
$version
= null
Methods
addConfigValue()
Add new value to config
public
addConfigValue(string $name, string $value) : AbstractApplication
Parameters
- $name : string
- $value : string
Return values
AbstractApplicationapplication()
Get application
public
application() : Application
Return values
Applicationconfig()
Access application config
public
config() : mixed
deleteConfigValue()
Replace existing value in config
public
deleteConfigValue(string $name) : AbstractApplication
Parameters
- $name : string
Return values
AbstractApplicationgetFullName()
Get full name
public
getFullName() : string
Return values
stringgetName()
Get name
public
getName() : string
Return values
stringgetVersion()
Get version
public
getVersion() : string
Return values
stringhasFullName()
Determine if the full name is set
public
hasFullName() : bool
Return values
boolhasName()
Determine if the name is set
public
hasName() : bool
Return values
boolhasVersion()
Determine if version has been set
public
hasVersion() : bool
Return values
boolisRegistered()
Determine if the module has been registered with an application object
public
isRegistered() : bool
Return values
boolload()
Optional method that can be used to load custom operations/configurations for an application to run
public
load() : AbstractApplication
Return values
AbstractApplicationmergeConfig()
Merge new or altered config values with the existing config values
public
mergeConfig(mixed $config[, bool $preserve = false ][, array<string|int, mixed> $exclude = [] ]) : AbstractApplication
Parameters
- $config : mixed
- $preserve : bool = false
- $exclude : array<string|int, mixed> = []
Tags
Return values
AbstractApplicationregister()
Register module
public
abstract register(Application $application) : AbstractModule
Parameters
- $application : Application
Return values
AbstractModuleregisterConfig()
Register a new configuration with the application
public
registerConfig(mixed $config) : AbstractApplication
Parameters
- $config : mixed
Tags
Return values
AbstractApplicationsetFullName()
Set full name
public
setFullName(string $fullName) : static
Parameters
- $fullName : string
Return values
staticsetName()
Set name
public
setName(string $name) : static
Parameters
- $name : string
Return values
staticsetVersion()
Set version
public
setVersion(string $version) : static
Parameters
- $version : string
Return values
staticupdateConfigValue()
Update existing value in config
public
updateConfigValue(string $name, string $value) : AbstractApplication
Parameters
- $name : string
- $value : string