예제 #1
0
 /**
  * @param Id $id
  * @return Movement
  * @throws \Kontuak\Exception\Source\EntityNotFound
  */
 public function get(Id $id)
 {
     $movement = $this->repository->find($id->toString());
     if (null === $movement) {
         throw new EntityNotFound();
     }
     return $movement;
 }
예제 #2
0
 public function mapToDomain()
 {
     $this->id = Id::parse($this->doctrineId);
 }
예제 #3
0
 /**
  * @param Id $id
  * @return Movement\Collection
  */
 public function byId(Id $id)
 {
     $this->queryBuilder->andWhere('m.doctrineId = :movementId')->setParameter('movementId', $id->toString());
     return $this;
 }