示例#1
0
 /**
  * Creates an exchange for the collection
  *
  * @param string $name the name of the exchange to create
  * @param array $config the exchange configuration
  *
  * @return Exchange the exchange instance
  */
 protected function createExchange($name, $config = array())
 {
     $exchange = new Exchange();
     foreach ($config as $key => $value) {
         $exchange->{$key} = $value;
     }
     $exchange->name = strtolower($name);
     $exchange->setClient($this->getClient());
     return $exchange;
 }