| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | * @throws \RuntimeException if the type is invalid |
| 18 | 18 | */ |
| 19 | 19 | public static function create(array $definition, ShapeMap $shapeMap) |
| 20 | 20 | { |
| 21 | - static $map = ['structure' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\StructureShape', 'map' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\MapShape', 'list' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\ListShape', 'timestamp' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\TimestampShape', 'integer' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'double' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'float' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'long' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'string' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'byte' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'character' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'blob' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape', 'boolean' => 'Dudlewebs\\WPMCS\\s3\\Aws\\Api\\Shape']; | |
| 21 | + static $map = ['structure' => StructureShape::class, 'map' => MapShape::class, 'list' => ListShape::class, 'timestamp' => TimestampShape::class, 'integer' => Shape::class, 'double' => Shape::class, 'float' => Shape::class, 'long' => Shape::class, 'string' => Shape::class, 'byte' => Shape::class, 'character' => Shape::class, 'blob' => Shape::class, 'boolean' => Shape::class]; | |
| 22 | 22 | if (isset($definition['shape'])) { |
| 23 | 23 | return $shapeMap->resolve($definition); |
| 24 | 24 | } |
| 25 | 25 | if (!isset($map[$definition['type']])) { |
| @@ -44,6 +44,13 @@ | ||
| 44 | 44 | */ |
| 45 | 45 | public function getName() |
| 46 | 46 | { |
| 47 | 47 | return $this->definition['name']; |
| 48 | + } | |
| 49 | + /** | |
| 50 | + * Get a context param definition. | |
| 51 | + */ | |
| 52 | + public function getContextParam() | |
| 53 | + { | |
| 54 | + return $this->contextParam; | |
| 48 | 55 | } |
| 49 | 56 | } |