示例#1
0
 /**
  * @return Link
  */
 public function getItem($id)
 {
     $this->transaction->requestTransaction();
     if (null === $this->project) {
         $item = Link::fetchUnassigned($this->conn, $id, $this->project);
     } else {
         $item = Link::fetchByProject($this->conn, $id, $this->project);
     }
     if (false === $item) {
         $this->transaction->requestRollback();
         throw new ItemNotFoundException('The specified item has not been found.', $id);
     }
     return $item;
 }