ICanBoogie
  • Documentation
  • API Reference
  • ActiveRecord 4.0.x
Namespaces
  • ICanBoogie
    • ActiveRecord
      • ActiveRecordCache
      • Driver
      • Property
      • Validate
        • Reader
        • Validator
        • ValidatorProvider
Classes
  • BelongsToRelation
  • Connection
  • ConnectionCollection
  • ConnectionOptions
  • HasManyRelation
  • Model
  • ModelCollection
  • ModelProvider
  • Query
  • Relation
  • RelationCollection
  • RelationNotDefined
  • Schema
  • SchemaColumn
  • Statement
  • Table
Interfaces
  • ActiveRecordCache
  • Driver
  • Exception
Exceptions
  • ActiveRecordClassNotValid
  • ConnectionAlreadyEstablished
  • ConnectionNotDefined
  • ConnectionNotEstablished
  • DriverNotDefined
  • ModelAlreadyInstantiated
  • ModelNotDefined
  • RecordNotFound
  • RecordNotValid
  • ScopeNotDefined
  • StatementInvocationFailed
  • StatementNotValid
  • UnableToSetFetchMode

Class ConnectionCollection

Connection collection.

ICanBoogie\ActiveRecord\ConnectionCollection implements ArrayAccess, IteratorAggregate uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\ActiveRecord
Located at ActiveRecord/ConnectionCollection.php

Methods summary

protected get_definitions( void )
protected get_established( void )
public __construct( array $definitions )

Initializes the $definitions property.

Initializes the $definitions property.

Parameters

$definitions
Connection definitions.
public offsetExists( string $id ) : boolean

Checks if a connection definition exists.

Checks if a connection definition exists.

Parameters

$id
Connection identifier.

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public offsetSet( string $id, array|string $definition )

Sets the definition of a connection.

Sets the definition of a connection.

Parameters

$id
Connection identifier.
$definition
Connection definition.

Throws

ICanBoogie\ActiveRecord\ConnectionAlreadyEstablished

in attempt to set the definition of an already established connection.

Implementation of

ArrayAccess::offsetSet()
public offsetUnset( string $id )

Removes a connection definition.

Removes a connection definition.

Parameters

$id
Connection identifier.

Throws

ICanBoogie\ActiveRecord\ConnectionAlreadyEstablished

in attempt to unset the definition of an already established connection.

Implementation of

ArrayAccess::offsetUnset()
public offsetGet( string $id ) : ICanBoogie\ActiveRecord\Connection

Returns a connection to the specified database.

Returns a connection to the specified database.

If the connection has not been established yet, it is created on the fly.

Parameters

$id
Connection identifier.

Returns

ICanBoogie\ActiveRecord\Connection

Throws

ICanBoogie\ActiveRecord\ConnectionNotDefined
when the connection requested is not defined.
ICanBoogie\ActiveRecord\ConnectionNotEstablished
when the connection failed.

Implementation of

ArrayAccess::offsetGet()
public getIterator( void )

Returns an iterator for established connections.

Returns an iterator for established connections.

Implementation of

IteratorAggregate::getIterator()

Properties summary

Magic properties

public read-only $definitions : array

Connection definitions.

public read-only $established : ICanBoogie\ActiveRecord\Connection[]

Established connections.

ActiveRecord 4.0.x – Check on GitHub – API documentation generated by ApiGen