Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • AbstractModule
  • ModuleConfig
  • ModuleManager

Interfaces

  • ModuleInterface
  • Overview
  • Namespace
  • Class

Class AbstractModule

Charcoal\App\Module\AbstractModule implements Charcoal\App\AppAwareInterface, Charcoal\Config\ConfigurableInterface, Psr\Log\LoggerAwareInterface, Charcoal\App\Module\ModuleInterface uses Charcoal\App\AppAwareTrait, Psr\Log\LoggerAwareTrait (not available)
Abstract
Namespace: Charcoal\App\Module
Located at Charcoal/App/Module/AbstractModule.php
Methods summary
public
# __construct( array $data )

Return a new AbstractModule object.

Return a new AbstractModule object.

Parameters

$data
Module dependencies.
public Charcoal\App\Module\AbstractModule
# setConfig( Charcoal\Config\ConfigInterface|array $config )

Set the module's config

Set the module's config

Parameters

$config
The module configuration.

Returns

Charcoal\App\Module\AbstractModule
public Charcoal\Config\ConfigInterface|mixed
# config( string $key = null )

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

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

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

Returns

Charcoal\Config\ConfigInterface|mixed

Throws

InvalidArgumentException
If a config has not been defined.
public Charcoal\App\Module\AbstractModule
# setup( )

Setup the module's dependencies.

Setup the module's dependencies.

Returns

Charcoal\App\Module\AbstractModule

Implementation of

Charcoal\App\Module\ModuleInterface::setup()
public Charcoal\App\Module\AbstractModule
# setupRoutes( )

Set up the module's routes, via a RouteManager

Set up the module's routes, via a RouteManager

Returns

Charcoal\App\Module\AbstractModule
Chainable
Methods inherited from Charcoal\App\AppAwareInterface
setApp()
Methods used from Charcoal\App\AppAwareTrait
app(), setApp()
Properties summary
protected ConfigInterface $config

$config

$config

#
protected Charcoal\App\Route\RouteManager $routeManager
#
API documentation generated by ApiGen