예제 #1
0
 /**
  * @param myDoctrineQuery $query        The query used to fetch the record
  * @return myDoctrineRecord $record
  */
 protected function getRecord(dmDoctrineQuery $query)
 {
     $record = $query->fetchOne();
     if (!$record instanceof dmDoctrineRecord) {
         throw new dmException(sprintf('No record found for %s %d', $this->getDmModule(), $this->recordId));
     }
     return $record;
 }