| @@ 102-115 (lines=14) @@ | ||
| 99 | /** |
|
| 100 | * {@inheritdoc} |
|
| 101 | */ |
|
| 102 | public function getMetadata() |
|
| 103 | { |
|
| 104 | if(!$this->trackMetadata) { |
|
| 105 | return []; |
|
| 106 | } |
|
| 107 | ||
| 108 | $metadata = $this->pool->getItem(self::METADATA_KEY)->get(); |
|
| 109 | ||
| 110 | if(!is_array($metadata)) { |
|
| 111 | $metadata = []; |
|
| 112 | } |
|
| 113 | ||
| 114 | return $metadata; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * {@inheritdoc} |
|
| @@ 120-133 (lines=14) @@ | ||
| 117 | /** |
|
| 118 | * {@inheritdoc} |
|
| 119 | */ |
|
| 120 | public function getHistory() |
|
| 121 | { |
|
| 122 | if(!$this->trackMetadata) { |
|
| 123 | return []; |
|
| 124 | } |
|
| 125 | ||
| 126 | $history = $this->pool->getItem(self::HISTORY_KEY)->get(); |
|
| 127 | ||
| 128 | if(!is_array($history)) { |
|
| 129 | $history = []; |
|
| 130 | } |
|
| 131 | ||
| 132 | return $history; |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * Saves the metadata to cache |
|