[icinga-checkins] icinga.org: icingaweb2/feature/ inirepository-should-support-multiple-tables-13034: IniRepository: Improve documentation of attribute $configs

git at icinga.org git at icinga.org
Fri Nov 4 10:18:35 CET 2016


Module: icingaweb2
Branch: feature/inirepository-should-support-multiple-tables-13034
Commit: ca689bc9441170908ee464bc9b6213fe0cb3c26f
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=ca689bc9441170908ee464bc9b6213fe0cb3c26f

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Fri Nov  4 09:57:56 2016 +0100

IniRepository: Improve documentation of attribute $configs

refs #13034

---

 library/Icinga/Repository/IniRepository.php |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/library/Icinga/Repository/IniRepository.php b/library/Icinga/Repository/IniRepository.php
index e17bbaa..08d7213 100644
--- a/library/Icinga/Repository/IniRepository.php
+++ b/library/Icinga/Repository/IniRepository.php
@@ -20,27 +20,28 @@ use Icinga\Exception\StatementException;
  * <ul>
  *  <li>Insert, update and delete capabilities</li>
  *  <li>Triggers for inserts, updates and deletions</li>
+ *  <li>Lazy initialization of table specific configs</li>
  * </ul>
  */
 abstract class IniRepository extends Repository implements Extensible, Updatable, Reducible
 {
     /**
-     * Per-table configs
+     * The configuration files used as table specific datasources
      *
-     * Example:
+     * This must be initialized by concrete repository implementations, in the following format
      * <code>
      * array(
-     *   'event-type' => array(
-     *     'module'    => 'elasticsearch',
-     *     'path'      => 'event-types',
-     *     'keyColumn' => 'name'
+     *   'table_name' => array(
+     *     'config'    => 'name_of_the_ini_file_without_extension',
+     *     'keyColumn' => 'the_name_of_the_column_to_use_as_key_column',
+     *    ['module'    => 'the_name_of_the_module_if_any']
      *   )
      * )
      * </code>
      *
      * @var array
      */
-    protected $configs = null;
+    protected $configs;
 
     /**
      * The tables for which triggers are available when inserting, updating or deleting rows



More information about the icinga-checkins mailing list