Class ConnectionCollection
-
ICanBoogie\ActiveRecord\ConnectionCollection
implements
ArrayAccess,
IteratorAggregate
uses
ICanBoogie\Accessor\AccessorTrait (not available)
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
Implementation of
ArrayAccess::offsetSet()
public
offsetUnset( string $id
)
Removes a connection definition.
Removes a connection definition.
Parameters
$id
- Connection identifier.
Throws
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
Throws
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