Beispiel #1
0
 /**
  * Create a chan reader for a collection of Chans
  *
  * Array order matters here: there is no "load balancing" across chans
  * and an entity from a chan early in the array will be returned until
  * it has none available.
  */
 public function __construct(CollectiveDriver $factory, WireMapper $mapper, array $chans)
 {
     $this->driver = $factory->createChanReader($chans);
     $this->mapper = $mapper;
     $this->chans = $chans;
 }
Beispiel #2
0
 public function __construct($type, CollectiveDriver $factory, WireMapper $mapper, $id = null)
 {
     $this->type = $type;
     $this->mapper = $mapper;
     $this->driver = $factory->createChan($id);
 }