/**
  * @static
  * @param $configurationName
  * @return IDataSource
  */
 public static function buildFromConfiguration($configurationName)
 {
     //get the connection data object
     $connectionData = ConnectionDataFactory::buildFromConfiguration($configurationName);
     //figure out which driver we need to build the data source object from
     $dataSourceConfiguration = Configuration::getDataSourceConfiguration($configurationName);
     $dataSourceClassName = 'Salvo\\Barrage\\DataSource\\Relational\\Driver\\' . $dataSourceConfiguration['driver'] . '\\' . 'DataSource';
     return $dataSourceClassName::getInstance($connectionData);
 }
 /**
  * @static
  * @param $configurationName
  * @return IConnectionData
  */
 public static function buildFromConfiguration($configurationName)
 {
     $dataSourceConfiguration = Configuration::getDataSourceConfiguration($configurationName);
     $connectionDataClassName = 'Salvo\\Barrage\\DataSource\\Relational\\Driver\\' . $dataSourceConfiguration['driver'] . '\\' . 'ConnectionData';
     $host = $dataSourceConfiguration['host'];
     $username = $dataSourceConfiguration['username'];
     $password = $dataSourceConfiguration['password'];
     $database = $dataSourceConfiguration['database'];
     $port = !empty($dataSourceConfiguration['port']) ? $dataSourceConfiguration['port'] : null;
     $options = !empty($dataSourceConfiguration['options']) ? $dataSourceConfiguration['options'] : array();
     return new $connectionDataClassName($host, $username, $password, $database, $port, $options);
 }