Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/Api/ListShape.php

raw symbols SCIP
1 <?php
2 namespace Aws\Api;
3
4 /**
5 * Represents a list shape.
6 */
7 class ListShape extends Shape
8 {
9 private $member;
10
11 public function __construct(array $definition, ShapeMap $shapeMap)
12 {
13 $definition['type'] = 'list';
14 parent::__construct($definition, $shapeMap);
15 }
16
17 /**
18 * @return Shape
19 * @throws \RuntimeException if no member is specified
20 */
21 public function getMember()
22 {
23 if (!$this->member) {
24 if (!isset($this->definition['member'])) {
25 throw new \RuntimeException('No member attribute specified');
26 }
27 $this->member = Shape::create(
28 $this->definition['member'],
29 $this->shapeMap
30 );
31 }
32
33 return $this->member;
34 }
35 }