mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 21:34:28 +02:00
parent
fb3f3ed788
commit
e5b24eb467
@ -27,7 +27,13 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
|
|||||||
/**
|
/**
|
||||||
* Per-table datasources
|
* Per-table datasources
|
||||||
*
|
*
|
||||||
* @var Config[string]
|
* <code>
|
||||||
|
* array(
|
||||||
|
* $table => $datasource
|
||||||
|
* )
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
|
* @var Config[]
|
||||||
*/
|
*/
|
||||||
protected $datasources = array();
|
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
|
* 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]);
|
unset($config[$keyColumn]);
|
||||||
return $section;
|
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
|
* @param string $table
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user