1 | <?php |
||
10 | class ExternalDocs extends AbstractModel implements Arrayable { |
||
11 | |||
12 | use DescriptionPart; |
||
13 | use UrlPart; |
||
14 | use ExtensionPart; |
||
15 | |||
16 | 12 | public function __construct($contents = []) { |
|
17 | 12 | $this->parse($contents); |
|
18 | 12 | } |
|
19 | |||
20 | 12 | private function parse($contents = []) { |
|
21 | 12 | $data = CollectionUtils::toMap($contents); |
|
22 | |||
23 | // parts |
||
24 | 12 | $this->parseDescription($data); |
|
25 | 12 | $this->parseUrl($data); |
|
26 | 12 | $this->parseExtensions($data); |
|
27 | 12 | } |
|
28 | |||
29 | 10 | /** |
|
30 | 10 | * {@inheritdoc} |
|
31 | */ |
||
32 | public function merge(static $model, $overwrite = false) { |
||
|
|||
33 | $this->mergeDescription($model, $overwrite); |
||
34 | $this->mergeUrl($model, $overwrite); |
||
43 |