ICanBoogie
  • Documentation
  • API Reference
  • Module master
Namespaces
  • ICanBoogie
    • Module
Classes
  • Descriptor
  • Hooks
  • ModelCollection
  • ModuleCollection
  • ModuleRoute
  • ModuleTemplateResolver
Traits
  • ControllerBindings
  • CoreBindings
Exceptions
  • ModuleCollectionInstallFailed
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined

Class ModelCollection

Model collection.

Extends the ActiveRecord model collection with the models defined by the modules.

ICanBoogie\ActiveRecord\ModelCollection
┗ ICanBoogie\Module\ModelCollection
Namespace: ICanBoogie\Module
Located at ModelCollection.php

Methods summary

public __construct( ICanBoogie\ActiveRecord\ConnectionCollection $connections, ICanBoogie\Module\ModuleCollection $modules, array $definitions = [] )

Parameters

$connections
Connections manager.
$modules
ModuleCollection manager.
$definitions
Model definitions.
public offsetExists( string $id ) : boolean

Checks if a model exists by first checking if the module it belongs to is enabled and that it actually defines the model.

Checks if a model exists by first checking if the module it belongs to is enabled and that it actually defines the model.

Parameters

$id

Returns

boolean
public offsetGet( string $id ) : ICanBoogie\ActiveRecord\Model

Gets the specified model of the specified module.

Gets the specified model of the specified module.

The pattern used to request a model is <module_id>[/<model_id>] where <module_id> is the identifier of the module and <model_id> is the identifier of the module's model. The <model_id> part is optional and defaults to primary.

Parameters

$id
Identifier of the model.

Returns

ICanBoogie\ActiveRecord\Model

Properties summary

protected $modules : ICanBoogie\Module\ModuleCollection

		
Module master – Check on GitHub – API documentation generated by ApiGen