public function exchangeSettings($targetExchange)
  {

    $settings = null;
    if (isset($this->configSettings['configFile']->rabbit->exchanges)) {
      foreach ($this->configSettings['configFile']->rabbit->exchanges as $exchange => $exchangeSettings) {
        if ($exchange == $targetExchange) {
          $settings = $exchangeSettings;
        }
      }
    } else {
      echo 'Error - No exchange settings found.', PHP_EOL;
    }

    // Trap exchange not found
    if ($settings == null) {
      echo 'MB_Configuration->exchangeSettings(): Error - ' . $targetExchange . ' not found in config settings.';
      exit;
    }

    return $settings;
  }
public function exchangeSettings($targetExchange)
  {

    $settings = null;
    if (isset($this->configSettings['configFile']->rabbit->exchanges)) {
      foreach ($this->configSettings['configFile']->rabbit->exchanges as $exchange => $exchangeSettings) {
        if ($exchange == $targetExchange) {
          $settings = $exchangeSettings;
        }
      }
    } else {
      echo 'Error - No exchange settings found.', PHP_EOL;
    }

    // Trap exchange not found
    if ($settings == null) {
      echo 'MB_Configuration->exchangeSettings(): Error - ' . $targetExchange . ' not found in config settings.';
      exit;
    }

    return $settings;
  }
public function exchangeSettings ( $ targetExchange ) { $ settings = null ; if ( isset ( $ this -> configSettings [ 'configFile' ] -> rabbit -> exchanges ) ) { foreach ( $ this -> configSettings [ 'configFile' ] -> rabbit -> exchanges as $ exchange => $ exchangeSettings ) { if ( $ exchange == $ targetExchange ) { $ settings = $ exchangeSettings ; } } } else { echo 'Error - No exchange settings found.' , PHP_EOL ; } // Trap exchange not found if ( $ settings == null ) { echo 'MB_Configuration->exchangeSettings(): Error - ' . $ targetExchange . ' not found in config settings.' ; exit ; } return $ settings ; }
Gather all setting for a specific exchange

@param string $targetExchange
The name of the exchange to gather setting for.

@return array $settings
The exchange settings in the format needed for a RabbitMQ connection.
Gather all setting for a specific exchange