/**
* Spoji se z databzi.
*
* @return Bobr_Bobr
* @throws DibiDriverException
*/
private function connectToDatabase()
{
// @todo odchytavat vyjimku pri nepovedenem spojeni.
$config = new Config();
$connect = dibi::connect(array('driver' => 'postgre', 'string' => ' host=' . $config->dbHost . ' port=' . $config->dbPort . ' dbname=' . $config->dbName . ' user='******' password='******'', 'persistent' => $config->dbPersistent), $config->dbConnectionName);
return $this;
}