public function setConnectionInfo(array $connections)
    {

        foreach($connections as $connectionInfo)
        {
            if (empty($connectionInfo['hostname']))
                $connectionInfo['hostname'] = 'localhost';

            if (empty($connectionInfo['port']))
                $connectionInfo['port'] = 3306;

            if (empty($connectionInfo['timeout']))
                $connectionInfo['timeout'] = 30;

            if (empty($connectionInfo['database']))
                throw new DatabaseException("Database name is empty.");

            if (empty($connectionInfo['username']))
                throw new DatabaseException("Database username is empty.");

        }

         //if(empty($connectionInfo['password']))
         //    throw new DatabaseException("Database password is empty.");

        $this->connectionConfig = $connections;
    }