[icinga-checkins] icinga.org: icingaweb2/master: IniRepository: fix doc and method order

git at icinga.org git at icinga.org
Fri Nov 4 10:38:01 CET 2016


Module: icingaweb2
Branch: master
Commit: e5b24eb467c3956c63635afc3b93d13f0003a629
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e5b24eb467c3956c63635afc3b93d13f0003a629

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Thu Nov  3 16:00:20 2016 +0100

IniRepository: fix doc and method order

refs #13034

---

 library/Icinga/Repository/IniRepository.php |   24 +++++++++++++++---------
 library/Icinga/Repository/Repository.php    |    2 +-
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/library/Icinga/Repository/IniRepository.php b/library/Icinga/Repository/IniRepository.php
index 1df35d7..ec9b4b1 100644
--- a/library/Icinga/Repository/IniRepository.php
+++ b/library/Icinga/Repository/IniRepository.php
@@ -27,7 +27,13 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
     /**
      * Per-table datasources
      *
-     * @var Config[string]
+     * <code>
+     * array(
+     *   $table => $datasource
+     * )
+     * </code>
+     *
+     * @var Config[]
      */
     protected $datasources = array();
 
@@ -61,6 +67,14 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
     }
 
     /**
+     * {@inheritDoc}
+     */
+    public function getDataSource($table = null)
+    {
+        return isset($this->datasources[$table]) ? $this->datasources[$table] : parent::getDataSource($table);
+    }
+
+    /**
      * Return the tables for which triggers are available when inserting, updating or deleting rows
      *
      * Calls $this->initializeTriggers() in case $this->triggers is null.
@@ -316,12 +330,4 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
         unset($config[$keyColumn]);
         return $section;
     }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function getDataSource($table = null)
-    {
-        return isset($this->datasources[$table]) ? $this->datasources[$table] : parent::getDataSource($table);
-    }
 }
diff --git a/library/Icinga/Repository/Repository.php b/library/Icinga/Repository/Repository.php
index 5e2b61b..1d111b4 100644
--- a/library/Icinga/Repository/Repository.php
+++ b/library/Icinga/Repository/Repository.php
@@ -263,7 +263,7 @@ abstract class Repository implements Selectable
     }
 
     /**
-     * Return the datasource being used for the table $table
+     * Return the datasource being used for the given table
      *
      * @param   string  $table
      *



More information about the icinga-checkins mailing list