summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-01-07 09:29:21 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-01-07 09:29:21 +0100
commitc464b32738c0b71501afbfa5447a317293fb54f9 (patch)
tree8c065c99b00dbcd2e75c1d38080486c493b8ff39 /lib
parent336fe868b2ee3a4105b93b71a1e739c9e412237b (diff)
downloadnextcloud-server-c464b32738c0b71501afbfa5447a317293fb54f9.tar.gz
nextcloud-server-c464b32738c0b71501afbfa5447a317293fb54f9.zip
OC_DB_MDB2SchemaManager -> OC\DB\MDB2SchemaManager
Diffstat (limited to 'lib')
-rw-r--r--lib/private/db/mdb2schemamanager.php2
-rw-r--r--lib/private/db/mdb2schemawriter.php18
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/private/db/mdb2schemamanager.php b/lib/private/db/mdb2schemamanager.php
index aef485ed686..6fa9a63ec00 100644
--- a/lib/private/db/mdb2schemamanager.php
+++ b/lib/private/db/mdb2schemamanager.php
@@ -55,7 +55,7 @@ class MDB2SchemaManager {
* TODO: write more documentation
*/
public function getDbStructure($file) {
- return \OC_DB_MDB2SchemaWriter::saveSchemaToFile($file, $this->conn);
+ return \OC\DB\MDB2SchemaWriter::saveSchemaToFile($file, $this->conn);
}
/**
diff --git a/lib/private/db/mdb2schemawriter.php b/lib/private/db/mdb2schemawriter.php
index 8b74b545b3b..0ff04008b61 100644
--- a/lib/private/db/mdb2schemawriter.php
+++ b/lib/private/db/mdb2schemawriter.php
@@ -24,7 +24,12 @@
*
*/
-class OC_DB_MDB2SchemaWriter {
+namespace OC\DB;
+
+use Doctrine\DBAL\Schema\Column;
+use Doctrine\DBAL\Schema\Index;
+
+class MDB2SchemaWriter {
/**
* @param string $file
@@ -34,7 +39,7 @@ class OC_DB_MDB2SchemaWriter {
static public function saveSchemaToFile($file, \OC\DB\Connection $conn) {
$config = \OC::$server->getConfig();
- $xml = new SimpleXMLElement('<database/>');
+ $xml = new \SimpleXMLElement('<database/>');
$xml->addChild('name', $config->getSystemValue('dbname', 'owncloud'));
$xml->addChild('create', 'true');
$xml->addChild('overwrite', 'false');
@@ -56,7 +61,8 @@ class OC_DB_MDB2SchemaWriter {
}
/**
- * @param SimpleXMLElement $xml
+ * @param \Doctrine\DBAL\Schema\Table $table
+ * @param \SimpleXMLElement $xml
*/
private static function saveTable($table, $xml) {
$xml->addChild('name', $table->getName());
@@ -81,7 +87,8 @@ class OC_DB_MDB2SchemaWriter {
}
/**
- * @param SimpleXMLElement $xml
+ * @param Column $column
+ * @param \SimpleXMLElement $xml
*/
private static function saveColumn($column, $xml) {
$xml->addChild('name', $column->getName());
@@ -147,7 +154,8 @@ class OC_DB_MDB2SchemaWriter {
}
/**
- * @param SimpleXMLElement $xml
+ * @param Index $index
+ * @param \SimpleXMLElement $xml
*/
private static function saveIndex($index, $xml) {
$xml->addChild('name', $index->getName());