Database: factorized getVersionArray()

This commit is contained in:
Raphaël Doursenaud 2014-03-15 06:40:13 +01:00
parent 73d957f158
commit 3f6b175879
6 changed files with 10 additions and 51 deletions

View File

@ -125,6 +125,16 @@ abstract class DoliDB implements Database
}
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Define sort criteria of request
*

View File

@ -195,17 +195,6 @@ class DoliDBMssql extends DoliDB
return $version['computed'];
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Return version of database client driver
*

View File

@ -221,16 +221,6 @@ class DoliDBMysql extends DoliDB
return mysql_get_server_info($this->db);
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Return version of database client driver
*

View File

@ -225,16 +225,6 @@ class DoliDBMysqli extends DoliDB
return mysqli_get_server_info($this->db);
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Return version of database client driver
*

View File

@ -428,16 +428,6 @@ class DoliDBPgsql extends DoliDB
return '';
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Return version of database client driver
*

View File

@ -345,16 +345,6 @@ class DoliDBSqlite extends DoliDB
return $row[0];
}
/**
* Return version of database server into an array
*
* @return array Version array
*/
function getVersionArray()
{
return explode('.',$this->getVersion());
}
/**
* Return version of database client driver
*