src/Module.php
/**
     * Register aspects after all modules are loaded.
     *
     * @param ModuleEvent $e
     */
Register aspects after all modules are loaded.
Register aspects after all modules are loaded .
public function initializeAspects(ModuleEvent $e)
    {
        $serviceManager = $e->getParam('ServiceManager');
        $aspectContainer = $serviceManager->get(AspectContainer::class);
        $config          = $serviceManager->get('config');
        $listOfAspects   = $config[self::ASPECT_CONFIG_KEY];
        foreach ($listOfAspects as $aspectService) {
            $aspect = $serviceManager->get($aspectService);
            $aspectContainer->registerAspect($aspect);
        }
    }
public function initializeAspects ( ModuleEvent $ e ) { $ serviceManager = $ e -> getParam ( 'ServiceManager' ) ; $ aspectContainer = $ serviceManager -> get ( AspectContainer :: class ) ; $ config = $ serviceManager -> get ( 'config' ) ; $ listOfAspects = $ config [ self :: ASPECT_CONFIG_KEY ] ; foreach ( $ listOfAspects as $ aspectService ) { $ aspect = $ serviceManager -> get ( $ aspectService ) ; $ aspectContainer -> registerAspect ( $ aspect ) ; } }
Register aspects after all modules are loaded.
Register aspects after all modules are loaded .
/** @var AspectContainer $aspectContainer */