\Charcoal\App\ModuleAbstractModule

Summary

Methods
Properties
Constants
setApp()
__construct()
setConfig()
config()
setup()
setupRoutes()
No public properties found
No constants found
app()
$config
$routeManager
N/A
No private methods found
$app
N/A

Properties

$config

$config : \Charcoal\App\Module\ConfigInterface

Type

\Charcoal\App\Module\ConfigInterface

Methods

__construct()

__construct(array  $data) 

Return a new AbstractModule object.

Parameters

array $data

Module dependencies.

setConfig()

setConfig(\Charcoal\Config\ConfigInterface|array  $config) : \Charcoal\App\Module\AbstractModule

Set the module's config

Parameters

\Charcoal\Config\ConfigInterface|array $config

The module configuration.

Returns

\Charcoal\App\Module\AbstractModule

config()

config(string  $key = null) : \Charcoal\Config\ConfigInterface|mixed

Retrieve the module's configuration container, or one of its entry.

If a key is provided, return the configuration key value instead of the full object.

Parameters

string $key

Optional. If provided, the config key value will be returned, instead of the full object.

Throws

\InvalidArgumentException

If a config has not been defined.

Returns

\Charcoal\Config\ConfigInterface|mixed