Repository: Fix documentation of method getDataSource

refs #13034
This commit is contained in:
Johannes Meyer 2016-11-04 09:56:53 +01:00
parent bd7851d15c
commit df47026792
1 changed files with 7 additions and 1 deletions

View File

@ -269,12 +269,18 @@ abstract class Repository implements Selectable
* @param string $table
*
* @return Selectable
*
* @throws ProgrammingError In case no datasource is available
*/
public function getDataSource($table = null)
{
if ($this->ds === null) {
throw new ProgrammingError('No data source available');
throw new ProgrammingError(
'No data source available. It is required to either pass it'
. ' at initialization time or by overriding this method.'
);
}
return $this->ds;
}