Пример #1
0
 /**
  * @return TodoId
  */
 public function todoId()
 {
     if (is_null($this->todoId)) {
         $this->todoId = TodoId::fromString($this->aggregateId());
     }
     return $this->todoId;
 }
Пример #2
0
 /**
  * @param TodoId $other
  * @return bool
  */
 public function sameValueAs(TodoId $other)
 {
     return $this->toString() === $other->toString();
 }
Пример #3
0
 /**
  * @return TodoId
  */
 public function todoId()
 {
     return TodoId::fromString($this->payload['todo_id']);
 }
Пример #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());
 }