Ejemplo n.º 1
0
 /**
  * @return TodoId
  */
 public function todoId()
 {
     if (is_null($this->todoId)) {
         $this->todoId = TodoId::fromString($this->aggregateId());
     }
     return $this->todoId;
 }
Ejemplo n.º 2
0
 /**
  * @param TodoId $other
  * @return bool
  */
 public function sameValueAs(TodoId $other)
 {
     return $this->toString() === $other->toString();
 }
Ejemplo n.º 3
0
 /**
  * @return TodoId
  */
 public function todoId()
 {
     return TodoId::fromString($this->payload['todo_id']);
 }
Ejemplo n.º 4
0
 /**
  * @return string representation of the unique identifier of the aggregate root
  */
 protected function aggregateId()
 {
     return $this->todoId->toString();
 }
 /**
  * @param TodoId $todoId
  * @return Todo
  */
 public function get(TodoId $todoId)
 {
     return $this->getAggregateRoot($todoId->toString());
 }