@@ 34-69 (lines=36) @@ | ||
31 | * |
|
32 | * @author Julien Fastré <[email protected]> |
|
33 | */ |
|
34 | class LanguageCode extends AbstractElement |
|
35 | { |
|
36 | /** |
|
37 | * |
|
38 | * @var CodedSimple |
|
39 | */ |
|
40 | protected $code; |
|
41 | ||
42 | function __construct(CodedSimple $code) |
|
43 | { |
|
44 | $this->setCode($code); |
|
45 | } |
|
46 | ||
47 | ||
48 | function getCode() |
|
49 | { |
|
50 | return $this->code; |
|
51 | } |
|
52 | ||
53 | function setCode(CodedSimple $code) |
|
54 | { |
|
55 | $this->code = $code; |
|
56 | return $this; |
|
57 | } |
|
58 | ||
59 | ||
60 | protected function getElementTag(): string |
|
61 | { |
|
62 | return 'languageCode'; |
|
63 | } |
|
64 | ||
65 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
66 | { |
|
67 | return $this->createElement($doc, ['code']); |
|
68 | } |
|
69 | } |
|
70 |
@@ 35-83 (lines=49) @@ | ||
32 | * |
|
33 | * @author Julien Fastré <[email protected]> |
|
34 | */ |
|
35 | class RouteCode extends AbstractElement |
|
36 | { |
|
37 | /** |
|
38 | * |
|
39 | * @var CodedWithEquivalents |
|
40 | */ |
|
41 | protected $code; |
|
42 | ||
43 | /** |
|
44 | * |
|
45 | * @param CodedWithEquivalents $code |
|
46 | */ |
|
47 | public function __construct(CodedWithEquivalents $code) |
|
48 | { |
|
49 | $this->setCode($code); |
|
50 | } |
|
51 | ||
52 | /** |
|
53 | * |
|
54 | * @return type |
|
55 | */ |
|
56 | public function getCode() |
|
57 | { |
|
58 | return $this->code; |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * |
|
63 | * @param CodedWithEquivalents $code |
|
64 | * @return $this |
|
65 | */ |
|
66 | public function setCode(CodedWithEquivalents $code) |
|
67 | { |
|
68 | $this->code = $code; |
|
69 | return $this; |
|
70 | } |
|
71 | ||
72 | protected function getElementTag(): string |
|
73 | { |
|
74 | return 'routeCode'; |
|
75 | } |
|
76 | ||
77 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
78 | { |
|
79 | return $this->createElement($doc, ['code']); |
|
80 | } |
|
81 | ||
82 | ||
83 | } |
|
84 |