Beispiel #1
0
 public function __construct(Queue\Client $queue, $data)
 {
     $store = $queue->getStore()->getMessagesStore();
     $this->promisesStore = $queue->getStore()->getPromisesStore();
     $promise = new PromiseClient($this->promisesStore);
     $data = is_null($data) ? [Store::QUEUE_ID => $queue->getId(), Store::PROMISE => $promise->getId()] : is_array($data) ? array_merge($data, [Store::QUEUE_ID => $queue->getId(), Store::PROMISE => $promise->getId()]) : $data;
     parent::__construct($store, $data);
     $this->queue = $queue;
 }
Beispiel #2
0
 public function __construct(Store $store, $data = null)
 {
     parent::__construct($store, $data);
     $this->messagesStore = $this->getStore()->getMessagesStore();
     $this->promisesStore = $this->getStore()->getPromisesStore();
 }