Class Hooks
Hook callbacks.
Methods summary
public static
filter_autoconfig( array & $autoconfig
)
Adds "modules" directories found in the app directories to module-path
.
public static
on_app_configure( ICanBoogie\Application\ConfigureEvent $event
, ICanBoogie\Application $app
)
Extends application configuration according to modules features.
public static
on_app_boot( ICanBoogie\Application\BootEvent $event
, ICanBoogie\Application $app
)
Boot enabled modules.
public static
before_synthesize_routes( ICanBoogie\Binding\Routing\BeforeSynthesizeRoutesEvent $event
)
Alter routes defined by modules by adding a module
key that holds the identifier of the
module that defines the route.
public static
on_template_resolver_alter( ICanBoogie\Render\TemplateResolver\AlterEvent $event
)
Decorates the template resolver with a ICanBoogie\Module\ModuleTemplateResolver
instance.
public static
on_view_alter( ICanBoogie\View\View\AlterEvent $event
, ICanBoogie\View\View $target
)
If the view renders a module's route, the "template" directory of that module is added
to the list of templates locations. Also, the module is set as module
view variable.
public static
on_alter_request_dispatcher( ICanBoogie\HTTP\RequestDispatcher\AlterEvent $event
, ICanBoogie\HTTP\RequestDispatcher $target
)
public static
on_app_clear_cache( ICanBoogie\Application\ClearCacheEvent $event
, ICanBoogie\Application $app
)
Clears modules cache.
public static
get_modules( ICanBoogie\Application $app
)
: ICanBoogie\Module\ModuleCollection
Return the ICanBoogie\Module\ModuleCollection
instance used to manage the modules attached to the core.
public static
get_models( ICanBoogie\Application $app
)
: ICanBoogie\Module\ModelCollection
Returns the ICanBoogie\Module\ModelCollection
instance used to obtain the models defined by the modules.
public static
controller_get_module( ICanBoogie\Routing\Controller $controller
)
: ICanBoogie\Module
Return the ICanBoogie\Module
instance associated with the route handled by the controller.
public static
controller_get_model( ICanBoogie\Routing\Controller $controller
)
: ICanBoogie\ActiveRecord\Model
Return the primary model of the module associated with the route handled by the controller.
public static
controller_lazy_get_records_fetcher( ICanBoogie\Routing\Controller $controller
)
: ICanBoogie\Facets\Fetcher\BasicFetcher
Return a record fetcher for the controller model
.