Closed gin0115 closed 1 year ago
this has been implemented slightly differently.
$app_factory
->module(Module::class)
->module(
Another_Module::class,
function(Another_Module $module, ?Registation_Middleware $middleware): Another_Module{
$module->some_setup('value);
$middleware->set_config('vale');
return $module;
}
);
``
this can also be done both before and after the Module_Manager
is defined in the App
instance.
If called before, it stacks them in array, these are then added when the Module_Manager is defiend
The was modules are currently added to perique is a bit messy.
Currelty many have both a Static method which is used to add all hooks and then if there is middleware, this needs adding also.
Would like to have the means to have a function on the App_Factory will allows you to just add the module name and it handles it all internally.