ICanBoogie/bind-activerecord master
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Binding
      • ActiveRecord

Classes

  • Hooks

Traits

  • CoreBindings

Class Hooks

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

Methods summary

public static array
# synthesize_connections_config( array $fragments )

Synthesizes the activerecord_connections config from activerecord#connections fragments.

Synthesizes the activerecord_connections config from activerecord#connections fragments.

Parameters

$fragments

Returns

array
public static array
# synthesize_models_config( array $fragments )

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 ICanBoogie\ActiveRecord\ConnectionCollection
# core_lazy_get_connections( ICanBoogie\Core $app )

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 ICanBoogie\ActiveRecord\ModelCollection
# core_lazy_get_models( ICanBoogie\Core $app )

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 ICanBoogie\ActiveRecord\Connection
# core_lazy_get_db( ICanBoogie\Core $app )

Getter for the "primary" database connection.

Getter for the "primary" database connection.

Parameters

$app

Returns

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

Parameters

$record

Returns

ICanBoogie\Validate\ValidationErrors|array
public static ICanBoogie\ActiveRecord\ActiveRecordCache\RuntimeActiveRecordCache
# model_lazy_get_activerecord_cache( ICanBoogie\ActiveRecord\Model $model )

Returns the records cache associated with the model.

Returns the records cache associated with the model.

Parameters

$model

Returns

ICanBoogie\ActiveRecord\ActiveRecordCache\RuntimeActiveRecordCache
ICanBoogie/bind-activerecord master API documentation generated by ApiGen