mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-06 13:01:33 -07:00
35 lines
786 B
PHP
35 lines
786 B
PHP
<?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;
|
|
}
|
|
}
|