1: <?php
2:
3: namespace Guzzle\Service\Resource;
4:
5: use Guzzle\Common\Collection;
6: use Guzzle\Service\Description\Parameter;
7:
8: /**
9: * Default model created when commands create service description model responses
10: */
11: class Model extends Collection
12: {
13: /**
14: * @var Parameter Structure of the model
15: */
16: protected $structure;
17:
18: /**
19: * @param array $data Data contained by the model
20: * @param Parameter $structure The structure of the model
21: */
22: public function __construct(array $data = array(), Parameter $structure = null)
23: {
24: $this->data = $data;
25: $this->structure = $structure ?: new Parameter();
26: }
27:
28: /**
29: * Get the structure of the model
30: *
31: * @return Parameter
32: */
33: public function getStructure()
34: {
35: return $this->structure;
36: }
37: }
38: