# DBPool Class Reference
[Connectors and dialects for various databases]

Pool of DB's instances. More...

Inheritance diagram for DBPool:
[legend]

List of all members.

## Public Member Functions

| setDefault (DB $db)
| dropDefault ()
| addLink ($name, DB $db)
| dropLink ($name)
| getLink ($name=null)
| shutdown ()
| disconnect ()

## Static Public Member Functions

static | me ()
static | getByDao (GenericDAO $dao)

## Private Attributes

| $default = null
| $pool = array()

## Detailed Description

Pool of DB's instances.

Definition at line 17 of file DBPool.class.php.

## Member Function Documentation

DBPool::addLink | ( | $ | name,
|  | DB $ | db |
| ) |  |  |

Exceptions:

  | WrongArgumentException |

Returns:
  DBPool

Definition at line 63 of file DBPool.class.php.

DBPool::disconnect | ( |  | ) |

Returns:
  DBPool

Definition at line 138 of file DBPool.class.php.

Referenced by shutdown().

DBPool::dropDefault | ( |  | ) |

Returns:
  DBPool

Definition at line 52 of file DBPool.class.php.

DBPool::dropLink | ( | $ | name | ) |

Exceptions:

  | MissingElementException |

Returns:
  DBPool

Definition at line 79 of file DBPool.class.php.

static DBPool::getByDao | ( | GenericDAO $ | dao | ) | `[static]`

Returns:
  DB

Definition at line 34 of file DBPool.class.php.

References GenericDAO::getLinkName(), and me().

Referenced by StorableDAO::add(), BaseDaoWorker::cachedFetchObject(), GenericDAO::doInject(), BaseDaoWorker::dropById(), BaseDaoWorker::dropByIds(), UnifiedContainerWorker::dropList(), BaseDaoWorker::fetchList(), BaseDaoWorker::fetchObject(), CommonDaoWorker::getCustom(), CommonDaoWorker::getCustomList(), CommonDaoWorker::getCustomRowList(), CommonDaoWorker::getQueryResult(), DaoUtils::increment(), CarefulDatabaseRunner::run(), UnifiedContainer::save(), OneToManyLinkedLazy::sync(), OneToManyLinkedFull::sync(), ManyToManyLinkedLazy::sync(), ManyToManyLinkedFull::sync(), Criteria::toString(), and LightMetaProperty::toValue().

Here is the call graph for this function:

DBPool::getLink | ( | $ | name = `null` | ) |

Exceptions:

  | MissingElementException |

Returns:
  DB

Definition at line 95 of file DBPool.class.php.

static DBPool::me | ( |  | ) | `[static]`

Returns:
  DBPool

Implements Instantiatable.

Definition at line 26 of file DBPool.class.php.

References Singleton::getInstance().

Referenced by MetaConfiguration::checkEnumerationReferentialIntegrity(), DebugUtils::eq(), getByDao(), CommonDaoWorker::getById(), CommonDaoWorker::getByQuery(), CommonDaoWorker::getCustom(), CommonDaoWorker::getCustomList(), CommonDaoWorker::getCustomRowList(), CommonDaoWorker::getListByQuery(), MyImprovedDialect::quoteBinary(), MyImprovedDialect::quoteValue(), and DaoUtils::swap().

Here is the call graph for this function:

DBPool::setDefault | ( | DB $ | db | ) |

Returns:
  DBPool

Definition at line 42 of file DBPool.class.php.

DBPool::shutdown | ( |  | ) |

Returns:
  DBPool

Definition at line 125 of file DBPool.class.php.

References disconnect().

Here is the call graph for this function:

## Member Data Documentation

DBPool::$default = null`[private]`

Definition at line 19 of file DBPool.class.php.

DBPool::$pool = array()`[private]`

Definition at line 21 of file DBPool.class.php.

The documentation for this class was generated from the following file:

- core/DB/DBPool.class.php