ICanBoogie
  • Documentation
  • API Reference
  • bind-activerecord master
Namespaces
  • ICanBoogie
    • Binding
      • ActiveRecord
Classes
  • Hooks
Traits
  • CoreBindings

Class Hooks

Namespace: ICanBoogie\Binding\ActiveRecord
Located at Hooks.php

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

array
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

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

Patches the get_model() helper to use the model collection bound to the application.

Patches the get_model() helper to use the model collection bound to the application.

Parameters

$event
$app
public static core_lazy_get_connections( ICanBoogie\Core $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

ICanBoogie\ActiveRecord\ConnectionCollection
public static core_lazy_get_models( ICanBoogie\Core $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

ICanBoogie\ActiveRecord\ModelCollection
public static core_lazy_get_db( ICanBoogie\Core $app ) : ICanBoogie\ActiveRecord\Connection

Getter for the "primary" database connection.

Getter for the "primary" database connection.

Parameters

$app

Returns

ICanBoogie\ActiveRecord\Connection
public static active_record_validate( ICanBoogie\ActiveRecord $record ) : ICanBoogie\Validate\ValidationErrors|array

Parameters

$record

Returns

ICanBoogie\Validate\ValidationErrors|array
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

Returns

ICanBoogie\ActiveRecord\ActiveRecordCache\RuntimeActiveRecordCache
bind-activerecord master – Check on GitHub – API documentation generated by ApiGen