Example #1
0
 /**
  * @return EdkRoute
  */
 public function getItemBySlug($slug)
 {
     $this->transaction->requestTransaction();
     try {
         $item = EdkRoute::fetchBySlug($this->conn, $slug);
         if (false === $item) {
             $this->transaction->requestRollback();
             throw new ItemNotFoundException('The specified item has not been found.', $id);
         }
         return $item;
     } catch (Exception $ex) {
         $this->transaction->requestRollback();
         throw $ex;
     }
 }