protected function __init()
    {
        $events = $this->event();

        // --- How to resolve requested module --------------------------------\
        // --------------------------------------------------------------------\
        ## resolve to module by looking on ModuleName\Module class
        ## also set options on array modules, like ['module'=>$opts]
        $events->on(
            ModuleManagerEvents\EventModuleResolve::EVENT_NAME
            , new ModuleManager\Events\ModuleResolve\ListenerResolverDefault
            , 100
        );

        $events->on(
            ModuleManagerEvents\EventModuleResolve::EVENT_NAME
            , new ModuleManager\Events\ModuleResolve\ListenerResolverDirectory
            , 90
        );

        // --- Features Call Immanently after resolve module object -----------\
        // --------------------------------------------------------------------\
        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitInitialization
            , 1000
        );

        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitServices
            , 900
        );

        ## register modules services and actions
        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitNestedContainer
        );


        // --- Features Call After Whole Modules Initialized        -----------\
        // --------------------------------------------------------------------\
        // Event Param: $module_manager

        # Register Actions
        #
        // Note: Actions do not access to Initialized Configs...
        //       actions on registration just must register itself and no need any instantiate
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerRegisterActions
            , -100
        );

        # Instantiate Merged Config instance() services
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerInstantiateMergedConfig
            , -500
        );

        # Resolve registered services to module
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerGrabRegisteredServices
            , -1000
        );

        ## attach application events listener
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModuleInitialize\ListenerInitSapiEvents
            , -10000
        );
    }
protected function __init()
    {
        $events = $this->event();

        // --- How to resolve requested module --------------------------------\
        // --------------------------------------------------------------------\
        ## resolve to module by looking on ModuleName\Module class
        ## also set options on array modules, like ['module'=>$opts]
        $events->on(
            ModuleManagerEvents\EventModuleResolve::EVENT_NAME
            , new ModuleManager\Events\ModuleResolve\ListenerResolverDefault
            , 100
        );

        $events->on(
            ModuleManagerEvents\EventModuleResolve::EVENT_NAME
            , new ModuleManager\Events\ModuleResolve\ListenerResolverDirectory
            , 90
        );

        // --- Features Call Immanently after resolve module object -----------\
        // --------------------------------------------------------------------\
        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitInitialization
            , 1000
        );

        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitServices
            , 900
        );

        ## register modules services and actions
        $events->on(
            ModuleManagerEvents\EventModuleInitialize::EVENT_NAME
            , new ModuleManager\Events\ModuleInitialize\ListenerInitNestedContainer
        );


        // --- Features Call After Whole Modules Initialized        -----------\
        // --------------------------------------------------------------------\
        // Event Param: $module_manager

        # Register Actions
        #
        // Note: Actions do not access to Initialized Configs...
        //       actions on registration just must register itself and no need any instantiate
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerRegisterActions
            , -100
        );

        # Instantiate Merged Config instance() services
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerInstantiateMergedConfig
            , -500
        );

        # Resolve registered services to module
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModulesPostLoad\ListenerGrabRegisteredServices
            , -1000
        );

        ## attach application events listener
        $events->on(
            EventHeapOfModuleManager::EVENT_MODULES_POSTLOAD
            , new ModuleManager\Events\ModuleInitialize\ListenerInitSapiEvents
            , -10000
        );
    }
protected function __init ( ) { $ events = $ this -> event ( ) ; // --- How to resolve requested module --------------------------------\ // --------------------------------------------------------------------\ ## resolve to module by looking on ModuleName\Module class ## also set options on array modules, like ['module'=>$opts] $ events -> on ( ModuleManagerEvents \ EventModuleResolve :: EVENT_NAME , new ModuleManager \ Events \ ModuleResolve \ ListenerResolverDefault , 100 ) ; $ events -> on ( ModuleManagerEvents \ EventModuleResolve :: EVENT_NAME , new ModuleManager \ Events \ ModuleResolve \ ListenerResolverDirectory , 90 ) ; // --- Features Call Immanently after resolve module object -----------\ // --------------------------------------------------------------------\ $ events -> on ( ModuleManagerEvents \ EventModuleInitialize :: EVENT_NAME , new ModuleManager \ Events \ ModuleInitialize \ ListenerInitInitialization , 1000 ) ; $ events -> on ( ModuleManagerEvents \ EventModuleInitialize :: EVENT_NAME , new ModuleManager \ Events \ ModuleInitialize \ ListenerInitServices , 900 ) ; ## register modules services and actions $ events -> on ( ModuleManagerEvents \ EventModuleInitialize :: EVENT_NAME , new ModuleManager \ Events \ ModuleInitialize \ ListenerInitNestedContainer ) ; // --- Features Call After Whole Modules Initialized        -----------\ // --------------------------------------------------------------------\ // Event Param: $module_manager # Register Actions # // Note: Actions do not access to Initialized Configs... //       actions on registration just must register itself and no need any instantiate $ events -> on ( EventHeapOfModuleManager :: EVENT_MODULES_POSTLOAD , new ModuleManager \ Events \ ModulesPostLoad \ ListenerRegisterActions , - 100 ) ; # Instantiate Merged Config instance() services $ events -> on ( EventHeapOfModuleManager :: EVENT_MODULES_POSTLOAD , new ModuleManager \ Events \ ModulesPostLoad \ ListenerInstantiateMergedConfig , - 500 ) ; # Resolve registered services to module $ events -> on ( EventHeapOfModuleManager :: EVENT_MODULES_POSTLOAD , new ModuleManager \ Events \ ModulesPostLoad \ ListenerGrabRegisteredServices , - 1000 ) ; ## attach application events listener $ events -> on ( EventHeapOfModuleManager :: EVENT_MODULES_POSTLOAD , new ModuleManager \ Events \ ModuleInitialize \ ListenerInitSapiEvents , - 10000 ) ; }
Attach default listeners
@see aModuleManager::loadModule
Attach default listeners