summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-01-02 15:36:54 +0100
committerRobin Appelman <robin@icewind.nl>2017-01-02 15:36:54 +0100
commit4c6ffeda3ecbaa10c7b07ffafde7f41a114a9214 (patch)
tree77d5e94c741a4f6f680efb1cd05e28925bf6f093
parent98fd6e0e2f94c1936869a249138802c286189b3f (diff)
downloadnextcloud-server-4c6ffeda3ecbaa10c7b07ffafde7f41a114a9214.tar.gz
nextcloud-server-4c6ffeda3ecbaa10c7b07ffafde7f41a114a9214.zip
phpdoc
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Settings/Mapper.php27
1 files changed, 23 insertions, 4 deletions
diff --git a/lib/private/Settings/Mapper.php b/lib/private/Settings/Mapper.php
index 9a7b3f64af2..2525f2c9854 100644
--- a/lib/private/Settings/Mapper.php
+++ b/lib/private/Settings/Mapper.php
@@ -39,6 +39,12 @@ class Mapper {
$this->dbc = $dbc;
}
+ /**
+ * Get the configured admin settings from the database for the provided section
+ *
+ * @param string $section
+ * @return array[] [['class' => string, 'priority' => int], ...]
+ */
public function getAdminSettingsFromDB($section) {
$query = $this->dbc->getQueryBuilder();
$query->select(['class', 'priority'])
@@ -50,6 +56,11 @@ class Mapper {
return $result->fetchAll();
}
+ /**
+ * Get the configured admin sections from the database
+ *
+ * @return array[] [['class' => string, 'priority' => int], ...]
+ */
public function getAdminSectionsFromDB() {
$query = $this->dbc->getQueryBuilder();
$query->selectDistinct('s.class')
@@ -65,7 +76,7 @@ class Mapper {
}
/**
- * @param string $table
+ * @param string $table Mapper::TABLE_ADMIN_SECTIONS or Mapper::TABLE_ADMIN_SETTINGS
* @param array $values
*/
public function add($table, array $values) {
@@ -80,7 +91,7 @@ class Mapper {
/**
* returns the registered classes in the given table
*
- * @param $table
+ * @param $table Mapper::TABLE_ADMIN_SECTIONS or Mapper::TABLE_ADMIN_SETTINGS
* @return string[]
*/
public function getClasses($table) {
@@ -97,7 +108,9 @@ class Mapper {
}
/**
- * @param string $table
+ * Check if a class is configured in the database
+ *
+ * @param string $table Mapper::TABLE_ADMIN_SECTIONS or Mapper::TABLE_ADMIN_SETTINGS
* @param string $className
* @return bool
*/
@@ -118,7 +131,7 @@ class Mapper {
/**
* deletes an settings or admin entry from the given table
*
- * @param $table
+ * @param $table Mapper::TABLE_ADMIN_SECTIONS or Mapper::TABLE_ADMIN_SETTINGS
* @param $className
*/
public function remove($table, $className) {
@@ -129,6 +142,12 @@ class Mapper {
$query->execute();
}
+ /**
+ * @param $table Mapper::TABLE_ADMIN_SECTIONS or Mapper::TABLE_ADMIN_SETTINGS
+ * @param $idCol
+ * @param $id
+ * @param $values
+ */
public function update($table, $idCol, $id, $values) {
$query = $this->dbc->getQueryBuilder();
$query->update($table);