PHP Class cascade\Config

Author: Raphael Antonmattei ([email protected])
Datei anzeigen Open project: theorchard/monolog-cascade Class Usage Examples

Protected Properties

Property Type Description
$formatters Monolog\Formatter\FormatterInterface[] Array of Formatter objects
$handlers Monolog\Handler\HandlerInterface[] Array of Handler objects
$input string | array Input from user. This is either a file path, a string or an array
$loader Cascade\Config\ConfigLoader Config loader
$loggers Monolog\Logger[] Array of logger objects
$options array Array of logger configuration options: (logger attributes, formatters, handlers, etc.)
$processors callable[] Array of Processor objects

Public Methods

Method Description
__construct ( string | array $input, Cascade\Config\ConfigLoader $loader ) Instantiate a Config object
configure ( ) Configure and register Logger(s) according to the options passed in
load ( ) Load config options into the options array using the injected loader

Protected Methods

Method Description
configureFormatters ( array $formatters = [] ) Configure the formatters
configureHandlers ( array $handlers ) Configure the handlers
configureLoggers ( array $loggers ) Configure the loggers
configureProcessors ( array $processors ) Configure the processors

Method Details

__construct() public method

Instantiate a Config object
public __construct ( string | array $input, Cascade\Config\ConfigLoader $loader )
$input string | array User input
$loader Cascade\Config\ConfigLoader Config loader object

configure() public method

Configure and register Logger(s) according to the options passed in
public configure ( )

configureFormatters() protected method

Configure the formatters
protected configureFormatters ( array $formatters = [] )
$formatters array Array of formatter options

configureHandlers() protected method

Configure the handlers
protected configureHandlers ( array $handlers )
$handlers array Array of handler options

configureLoggers() protected method

Configure the loggers
protected configureLoggers ( array $loggers )
$loggers array Array of logger options

configureProcessors() protected method

Configure the processors
protected configureProcessors ( array $processors )
$processors array Array of processor options

load() public method

Load config options into the options array using the injected loader
public load ( )

Property Details

$formatters protected_oe property

Array of Formatter objects
protected Monolog\Formatter\FormatterInterface[] $formatters
return Monolog\Formatter\FormatterInterface[]

$handlers protected_oe property

Array of Handler objects
protected Monolog\Handler\HandlerInterface[] $handlers
return Monolog\Handler\HandlerInterface[]

$input protected_oe property

Input from user. This is either a file path, a string or an array
protected string|array $input
return string | array

$loader protected_oe property

Config loader
protected ConfigLoader,Cascade\Config $loader
return Cascade\Config\ConfigLoader

$loggers protected_oe property

Array of logger objects
protected Monolog\Logger[] $loggers
return Monolog\Logger[]

$options protected_oe property

Array of logger configuration options: (logger attributes, formatters, handlers, etc.)
protected array $options
return array

$processors protected_oe property

Array of Processor objects
protected callable[] $processors
return callable[]