Skip to content

Commit

Permalink
Retrieve configuration on QL datastore and connection (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb authored and TomK committed Jun 18, 2018
1 parent ace9475 commit 3a8a092
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Ql/AbstractQlConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,16 @@ protected function _sanitizeException(\Exception $e)
return ConnectionException::from($e);
}

/**
* Return the configuration for this connection
*
* @return \Packaged\Config\ConfigSectionInterface
*/
public function getConfig()
{
return $this->_config();
}

/**
* @param \Exception $e
*
Expand Down
13 changes: 11 additions & 2 deletions src/Ql/QlDataStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ protected function _hasIds(QlDao $dao)
{
$ids = array_filter(
$dao->getId(true),
function ($value)
{
function ($value) {
return $value !== null;
}
);
Expand Down Expand Up @@ -380,4 +379,14 @@ public function setConnection(IQLDataConnection $connection)
$this->_connection = $connection;
return $this;
}

/**
* Returns the configuration for this datastore
*
* @return \Packaged\Config\ConfigSectionInterface
*/
public function getConfig()
{
return $this->_config();
}
}

0 comments on commit 3a8a092

Please sign in to comment.