コード例 #1
0
ファイル: Connection.class.php プロジェクト: xp-forge/stomp
 /**
  * Begin server transaction
  *
  * @param   peer.stomp.Transaction transaction
  * @return  peer.stomp.Transaction
  */
 public function begin(Transaction $transaction)
 {
     $transaction->begin($this);
     return $transaction;
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
 public function accepts_transaction_name()
 {
     $t = new Transaction('foobar');
     $this->assertEquals('foobar', $t->getName());
 }