@@ 27-35 (lines=9) @@ | ||
24 | $this->parse($contents === null ? new Map() : $contents); |
|
25 | } |
|
26 | ||
27 | private function parse($contents = []) { |
|
28 | $data = CollectionUtils::toMap($contents); |
|
29 | ||
30 | // parts |
|
31 | $this->parseDescription($data); |
|
32 | $this->parseType($data); |
|
33 | $this->parseItems($data); |
|
34 | $this->parseExtensions($data); |
|
35 | } |
|
36 | ||
37 | public function toArray() { |
|
38 | return $this->export('description', $this->getTypeExportFields(), 'items'); |
@@ 22-30 (lines=9) @@ | ||
19 | $this->parse($contents); |
|
20 | } |
|
21 | ||
22 | private function parse($contents = []) { |
|
23 | $data = CollectionUtils::toMap($contents); |
|
24 | ||
25 | // parts |
|
26 | $this->parseRef($data); |
|
27 | $this->parseType($data); |
|
28 | $this->parseItems($data); |
|
29 | $this->parseExtensions($data); |
|
30 | } |
|
31 | ||
32 | public function toArray() { |
|
33 | return $this->export($this->getTypeExportFields(), 'items'); |