예제 #1
0
 /**
  * @param Id $id
  * @return BaseCollection
  */
 public function byId(Id $id)
 {
     $this->queryBuilder->andWhere('pm.doctrineId = :movementId')->setParameter('movementId', $id->toString());
     return $this;
 }
 public function mapToDomain()
 {
     $period = null;
     $this->id = Id::parse($this->doctrineId);
     $this->period = Period::factory(self::$typeMapToDomain[$this->periodType], $this->periodAmount);
 }
예제 #3
0
 /**
  * @param Id $id
  * @return PeriodicalMovement
  */
 public function get(Id $id)
 {
     return $this->repository->find($id->serialize());
 }