コード例 #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;
 }