Ejemplo n.º 1
0
 public function findAndJoin($key, User $user)
 {
     $this->transaction->requestTransaction();
     try {
         $item = Invitation::fetchByKey($this->conn, $key);
         if (empty($item)) {
             throw new ItemNotFoundException('InvitationNotFoundText', $key);
         }
         $item->join($this->conn, $user);
     } catch (Exception $exception) {
         $this->transaction->requestRollback();
         throw $exception;
     }
 }