diff options
Diffstat (limited to 'vendor/aws/aws-sdk-php/src/Api/ListShape.php')
-rw-r--r-- | vendor/aws/aws-sdk-php/src/Api/ListShape.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vendor/aws/aws-sdk-php/src/Api/ListShape.php b/vendor/aws/aws-sdk-php/src/Api/ListShape.php new file mode 100644 index 0000000..a425efa --- /dev/null +++ b/vendor/aws/aws-sdk-php/src/Api/ListShape.php @@ -0,0 +1,35 @@ +<?php +namespace Aws\Api; + +/** + * Represents a list shape. + */ +class ListShape extends Shape +{ + private $member; + + public function __construct(array $definition, ShapeMap $shapeMap) + { + $definition['type'] = 'list'; + parent::__construct($definition, $shapeMap); + } + + /** + * @return Shape + * @throws \RuntimeException if no member is specified + */ + public function getMember() + { + if (!$this->member) { + if (!isset($this->definition['member'])) { + throw new \RuntimeException('No member attribute specified'); + } + $this->member = Shape::create( + $this->definition['member'], + $this->shapeMap + ); + } + + return $this->member; + } +} |