| @@ -57,8 +57,33 @@ | ||
| 57 | 57 | throw new \InvalidArgumentException('Unknown member ' . $name); |
| 58 | 58 | } |
| 59 | 59 | return $members[$name]; |
| 60 | 60 | } |
| 61 | + /** | |
| 62 | + * Used to look up the shape's original definition. | |
| 63 | + * ShapeMap::resolve() merges properties from both | |
| 64 | + * member and target shape definitions, causing certain | |
| 65 | + * properties like `locationName` to be overwritten. | |
| 66 | + * | |
| 67 | + * @return ShapeMap | |
| 68 | + * @internal This method is for internal use only and should not be used | |
| 69 | + * by external code. It may be changed or removed without notice. | |
| 70 | + */ | |
| 71 | + public function getShapeMap() : ShapeMap | |
| 72 | + { | |
| 73 | + return $this->shapeMap; | |
| 74 | + } | |
| 75 | + /** | |
| 76 | + * Used to look up a shape's original definition. | |
| 77 | + * | |
| 78 | + * @param string $name | |
| 79 | + * | |
| 80 | + * @return array|null | |
| 81 | + */ | |
| 82 | + public function getOriginalDefinition(string $name) : ?array | |
| 83 | + { | |
| 84 | + return $this->shapeMap[$name] ?? null; | |
| 85 | + } | |
| 61 | 86 | private function generateMembersHash() |
| 62 | 87 | { |
| 63 | 88 | $this->members = []; |
| 64 | 89 | foreach ($this->definition['members'] as $name => $definition) { |