Total Complexity | 10 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | 1 | final class TextInput implements IXmlConvertible { |
|
16 | 1 | use \Nette\SmartObject; |
|
17 | |||
18 | /** @var string */ |
||
19 | protected $title; |
||
20 | /** @var string */ |
||
21 | protected $description; |
||
22 | /** @var string */ |
||
23 | protected $name; |
||
24 | /** @var string */ |
||
25 | protected $link; |
||
26 | |||
27 | public function __construct(string $title, string $description, string $name, string $link) { |
||
28 | 1 | $this->title = $title; |
|
29 | 1 | $this->description = $description; |
|
30 | 1 | $this->name = $name; |
|
31 | 1 | $this->link = $link; |
|
32 | 1 | } |
|
33 | |||
34 | public function getTitle(): string { |
||
35 | 1 | return $this->title; |
|
36 | } |
||
37 | |||
38 | public function setTitle(string $title): void { |
||
39 | 1 | $this->title = $title; |
|
40 | 1 | } |
|
41 | |||
42 | public function getDescription(): string { |
||
43 | 1 | return $this->description; |
|
44 | } |
||
45 | |||
46 | public function setDescription(string $description): void { |
||
47 | 1 | $this->description = $description; |
|
48 | 1 | } |
|
49 | |||
50 | public function getName(): string { |
||
52 | } |
||
53 | |||
54 | public function setName(string $name): void { |
||
55 | 1 | $this->name = $name; |
|
56 | 1 | } |
|
57 | |||
58 | public function getLink(): string { |
||
60 | } |
||
61 | |||
62 | public function setLink(string $link): void { |
||
64 | 1 | } |
|
65 | |||
66 | public function appendToXml(\SimpleXMLElement &$parent): void { |
||
67 | 1 | $element = $parent->addChild("textInput"); |
|
68 | 1 | $element->addChild("title", $this->title); |
|
72 | 1 | } |
|
73 | } |
||
74 | ?> |