Class Hooks
Methods summary
public static
synthesize_connections_config( array $fragments
)
: array
Synthesizes the activerecord_connections
config from activerecord#connections
fragments.
Synthesizes the activerecord_connections
config from activerecord#connections
fragments.
Parameters
$fragments
Returns
public static
synthesize_models_config( array $fragments
)
: array
Synthesizes the activerecord_models
config from activerecord#models
fragments.
Synthesizes the activerecord_models
config from activerecord#models
fragments.
Parameters
$fragments
Returns
public static
on_app_boot( ICanBoogie\Application\BootEvent $event
, ICanBoogie\Application $app
)
Define model provider.
Define model provider.
Models are provided using the model collection bound to the application.
Parameters
$event
$app
public static
app_lazy_get_connections( ICanBoogie\Application $app
)
: ICanBoogie\ActiveRecord\ConnectionCollection
Returns a @{link ConnectionCollection} instance configured with
the activerecord_connections
config.
Returns a @{link ConnectionCollection} instance configured with
the activerecord_connections
config.
Parameters
$app
Returns
public static
app_lazy_get_models( ICanBoogie\Application $app
)
: ICanBoogie\ActiveRecord\ModelCollection
Returns a @{link ModelCollection} instance configured with
the activerecord_models
config.
Returns a @{link ModelCollection} instance configured with
the activerecord_models
config.
Parameters
$app
Returns
public static
app_lazy_get_db( ICanBoogie\Application $app
)
: ICanBoogie\ActiveRecord\Connection
Getter for the "primary" database connection.
Getter for the "primary" database connection.
Parameters
$app
Returns
public static
active_record_validate( ICanBoogie\ActiveRecord $record
)
: ICanBoogie\Validate\ValidationErrors|array
Parameters
$record
Returns
public static
model_lazy_get_activerecord_cache( ICanBoogie\ActiveRecord\Model $model
)
: ICanBoogie\ActiveRecord\ActiveRecordCache\RuntimeActiveRecordCache
Returns the records cache associated with the model.
Returns the records cache associated with the model.
Parameters
$model