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
- $name : string|null
- Name
- $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
- getName() : string
- Get name
- getVersion() : string
- Get version
- 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
- 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
$name
Name
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
AbstractApplicationgetName()
Get name
public
getName() : string
Return values
stringgetVersion()
Get version
public
getVersion() : string
Return values
stringhasName()
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 ]) : AbstractApplication
Parameters
- $config : mixed
- $preserve : bool = false
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
AbstractApplicationsetName()
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