src/Governor/Framework/Saga/Repository/Mongo/SagaEntry.php 1 location
|
@@ 76-85 (lines=10) @@
|
| 73 |
|
* @param SerializerInterface $serializer The serializer to decode the Saga |
| 74 |
|
* @return SagaInterface the Saga instance stored in this entry |
| 75 |
|
*/ |
| 76 |
|
public function getSaga(SerializerInterface $serializer) |
| 77 |
|
{ |
| 78 |
|
if (null !== $this->saga) { |
| 79 |
|
return $this->saga; |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
return $serializer->deserialize( |
| 83 |
|
new SimpleSerializedObject($this->serializedSaga, new SimpleSerializedType($this->sagaType)) |
| 84 |
|
); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
/** |
| 88 |
|
* Returns the Mongo Document representing the Saga provided in this entry. |
src/Governor/Framework/Saga/Repository/Orm/SagaEntry.php 1 location
|
@@ 97-112 (lines=16) @@
|
| 94 |
|
* @param SerializerInterface $serializer The serializer to decode the Saga |
| 95 |
|
* @return SagaInterface the Saga instance stored in this entry |
| 96 |
|
*/ |
| 97 |
|
public function getSaga(SerializerInterface $serializer) |
| 98 |
|
{ |
| 99 |
|
if (null !== $this->saga) { |
| 100 |
|
return $this->saga; |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
return $serializer->deserialize( |
| 104 |
|
new SimpleSerializedObject( |
| 105 |
|
$this->serializedSaga, |
| 106 |
|
new SimpleSerializedType( |
| 107 |
|
$this->sagaType, |
| 108 |
|
$this->revision |
| 109 |
|
) |
| 110 |
|
) |
| 111 |
|
); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
/** |
| 115 |
|
* Returns the serialized form of the Saga. |