/** * Begin server transaction * * @param peer.stomp.Transaction transaction * @return peer.stomp.Transaction */ public function begin(Transaction $transaction) { $transaction->begin($this); return $transaction; }
/** * Reject given message * * @param peer.stomp.Transaction $t */ public function nack(Transaction $t = null) { $this->assertConnection(); $frame = new NackFrame($this->getMessageId(), $this->getSubscription()->getId()); if ($t) { $frame->setTransaction($t->getName()); } $this->getDestination()->getConnection()->sendFrame($frame); }
public function accepts_transaction_name() { $t = new Transaction('foobar'); $this->assertEquals('foobar', $t->getName()); }