ICanBoogie/Module 3.0.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Module
      • ModuleCollection
      • Operation

Classes

  • Descriptor
  • ForwardedOperationDispatcher
  • Hooks
  • ModelCollection
  • ModuleCollection
  • ModuleOperationDispatcher
  • ModuleRouteDefinition
  • ModuleTemplateResolver

Traits

  • ControllerBindings
  • CoreBindings
  • ModuleRoute

Exceptions

  • ModuleCollectionInstallFailed
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined

Class Hooks

Hook callbacks.

Namespace: ICanBoogie\Module
Located at Module/Hooks.php

Methods summary

public static
# filter_autoconfig( array & $autoconfig )

Adds "modules" directories found in the app directories to module-path.

Adds "modules" directories found in the app directories to module-path.

Parameters

$autoconfig
public static
# on_core_configure( ICanBoogie\Core\ConfigureEvent $event, ICanBoogie\Core $app )

Extends application configuration according to modules features.

Extends application configuration according to modules features.

The method may extend the locale-path configuration value and the configuration paths according to the modules features.

Parameters

$event
$app
public static
# on_core_boot( ICanBoogie\Core\BootEvent $event, ICanBoogie\Core $app )

Boot enabled modules.

Boot enabled modules.

Before the modules are actually booted up, their index is used to alter the I18n load paths and the config paths.

Parameters

$event
$app
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.

Alter routes defined by modules by adding a module key that holds the identifier of the module that defines the route.

Parameters

$event
public static
# on_template_resolver_alter( ICanBoogie\Render\TemplateResolver\AlterEvent $event )

Decorates the template resolver with a ICanBoogie\Module\ModuleTemplateResolver instance.

Decorates the template resolver with a ICanBoogie\Module\ModuleTemplateResolver instance.

Parameters

$event
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.

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.

Parameters

$event
$target
public static
# on_alter_request_dispatcher( ICanBoogie\HTTP\RequestDispatcher\AlterEvent $event, ICanBoogie\HTTP\RequestDispatcher $target )

Parameters

$event
$target
public static
# on_core_clear_cache( ICanBoogie\Core\ClearCacheEvent $event, ICanBoogie\Core $app )

Clears modules cache.

Clears modules cache.

Parameters

$event
$app
public static ICanBoogie\Module\ModuleCollection
# get_modules( ICanBoogie\Core $app )

Return the ICanBoogie\Module\ModuleCollection instance used to manage the modules attached to the core.

Return the ICanBoogie\Module\ModuleCollection instance used to manage the modules attached to the core.

Parameters

$app

Returns

ICanBoogie\Module\ModuleCollection
The modules provider.
public static ICanBoogie\Module\ModelCollection
# get_models( ICanBoogie\Core $app )

Returns the ICanBoogie\Module\ModelCollection instance used to obtain the models defined by the modules.

Returns the ICanBoogie\Module\ModelCollection instance used to obtain the models defined by the modules.

Parameters

$app

Returns

ICanBoogie\Module\ModelCollection
The models accessor.
public static ICanBoogie\Module
# controller_get_module( ICanBoogie\Routing\Controller $controller )

Return the ICanBoogie\Module instance associated with the route handled by the controller.

Return the ICanBoogie\Module instance associated with the route handled by the controller.

Parameters

$controller

Returns

ICanBoogie\Module
public static ICanBoogie\ActiveRecord\Model
# controller_get_model( ICanBoogie\Routing\Controller $controller )

Return the primary model of the module associated with the route handled by the controller.

Return the primary model of the module associated with the route handled by the controller.

Parameters

$controller

Returns

ICanBoogie\ActiveRecord\Model

See

ICanBoogie\Module\Hooks::controller_get_module()
public static ICanBoogie\Facets\Fetcher\BasicFetcher
# controller_lazy_get_records_fetcher( ICanBoogie\Routing\Controller $controller )

Return a record fetcher for the controller model.

Return a record fetcher for the controller model.

Note: The "icanboogie/facets" package is required.

Parameters

$controller

Returns

ICanBoogie\Facets\Fetcher\BasicFetcher
public static ICanBoogie\Facets\RecordCollection
# controller_fetch_records( ICanBoogie\Routing\Controller $controller, array $modifiers )

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers

Returns

ICanBoogie\Facets\RecordCollection
public static ICanBoogie\ActiveRecord
# controller_fetch_record( ICanBoogie\Routing\Controller $controller, array $modifiers, ICanBoogie\Facets\Fetcher|null & $fetcher = null )

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers
$fetcher
Reference to a variable where the fetcher should be stored.

Returns

ICanBoogie\ActiveRecord
ICanBoogie/Module 3.0.x API documentation generated by ApiGen