Zend\ModuleManager\Listener\ConfigListener
Config listener
Synopsis
class ConfigListener
extends AbstractListener
implements
ConfigMergerInterface,ListenerAggregateInterface
{
- // constants
- const STATIC_PATH = 'static_path';
- const GLOB_PATH = 'glob_path';
- // members
- protected array $callbacks;
- protected array $configs;
- protected array $mergedConfig;
- protected Config $mergedConfigObject;
- protected bool $skipConfig;
- protected array $paths;
- // Inherited members from AbstractListener
- protected ListenerOptions $options;
- // methods
- public void __construct()
- public void attach()
- public ConfigListener onloadModulesPre()
- public ConfigListener onLoadModule()
- public ConfigListener onMergeConfig()
- public ConfigListener onLoadModules()
- public void detach()
- public mixed getMergedConfig()
- public ConfigListener setMergedConfig()
- public ConfigListener addConfigGlobPaths()
- public ConfigListener addConfigGlobPath()
- public ConfigListener addConfigStaticPaths()
- public ConfigListener addConfigStaticPath()
- protected ConfigListener addConfigPaths()
- protected ConfigListener addConfigPath()
- protected ConfigListener addConfig()
- protected ConfigListener addConfigByPath()
- protected bool hasCachedConfig()
- protected mixed getCachedConfig()
- // Inherited methods from AbstractListener
- public void __construct()
- public ListenerOptions getOptions()
- public AbstractListener setOptions()
- protected AbstractListener writeArrayToFile()
Hierarchy
Extends
Implements
Constants
Name | Value |
---|---|
STATIC_PATH | 'static_path' |
GLOB_PATH | 'glob_path' |
Members
protected
- $callbacks — array
- $configs — array
- $mergedConfig — array
- $mergedConfigObject — Zend\Config\Config
- $options — Zend\ModuleManager\Listener\ListenerOptions
- $paths — array
- $skipConfig — Zend\ModuleManager\Listener\bool
Methods
protected
- addConfig()
- addConfigByPath() — Given a path (glob or static), fetch the config and add it to the array of configs to merge.
- addConfigPath() — Add a path of config files to load and merge after loading modules
- addConfigPaths() — Add an array of paths of config files to merge after loading modules
- getCachedConfig()
- hasCachedConfig()
public
- __construct() — __construct
- addConfigGlobPath() — Add a glob path of config files to merge after loading modules
- addConfigGlobPaths() — Add an array of glob paths of config files to merge after loading modules
- addConfigStaticPath() — Add a static path of config files to merge after loading modules
- addConfigStaticPaths() — Add an array of static paths of config files to merge after loading modules
- attach() — {@inheritDoc}
- detach() — {@inheritDoc}
- getMergedConfig() — getMergedConfig
- onLoadModule() — Merge the config for each module
- onLoadModules() — Optionally cache merged config
- onMergeConfig() — Merge all config files matched by the given glob()s
- onloadModulesPre() — Pass self to the ModuleEvent object early so everyone has access.
- setMergedConfig() — setMergedConfig
Inherited from Zend\ModuleManager\Listener\AbstractListener
protected
- writeArrayToFile() — Write a simple array of scalars to a file
public
- getOptions() — Get options.
- setOptions() — Set options.