mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
parent
fb3f3ed788
commit
e5b24eb467
@ -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();
|
||||
|
||||
@ -60,6 +66,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
|
||||
*
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user