private function getDatabasePlatformVersion()
{
// Driver does not support version specific platforms.
if (!$this->_driver instanceof VersionAwarePlatformDriver) {
return null;
}
// Explicit platform version requested (supersedes auto-detection).
if (isset($this->_params['serverVersion'])) {
return $this->_params['serverVersion'];
}
// If not connected, we need to connect now to determine the platform version.
if (null === $this->_conn) {
$this->connect();
}
// Automatic platform version detection.
if ($this->_conn instanceof ServerInfoAwareConnection && !$this->_conn->requiresQueryForServerVersion()) {
return $this->_conn->getServerVersion();
}
// Unable to detect platform version.
return null;
}