/** * @param \Doctrine\DBAL\Connection|string $connection The database to connect to * @throws ErrorException */ public function __construct($connection) { // setup node if ($connection instanceof \Doctrine\DBAL\Connection) { $this->connection = $connection; } else { $this->connection = Config::getConnection($connection); } }