private function configureConnection(array &$newAttributes = null, array &$oldAttributes = null) {
		// if a connection is available
		if (isset($this->pdo)) {
			// if there are attributes that need to be applied
			if (isset($newAttributes)) {
				// get the keys and values of the attributes to apply
				foreach ($newAttributes as $key => $newValue) {
					// if the old state of the connection must be preserved
					if (isset($oldAttributes)) {
						// retrieve the old value for this attribute
						try {
							$oldValue = @$this->pdo->getAttribute($key);
						}
						catch (PDOException $e) {
							// the specified attribute is not supported by the driver
							$oldValue = null;
						}

						// if an old value has been found
						if (isset($oldValue)) {
							// if the old value differs from the new value that we're going to set
							if ($oldValue !== $newValue) {
								// save the old value so that we're able to restore it later
								$oldAttributes[$key] = $oldValue;
							}
						}
					}

					// and then set the desired new value
					$this->pdo->setAttribute($key, $newValue);
				}

				// if the old state of the connection doesn't need to be preserved
				if (!isset($oldAttributes)) {
					// we're done updating attributes for this connection once and for all
					$newAttributes = null;
				}
			}
		}
	}