1 | <?php |
||
2 | |||
3 | /** |
||
4 | * FACTURA ELECTRÓNICA SUNAT |
||
5 | * UBL 2.1 |
||
6 | * Version 1.0 |
||
7 | * |
||
8 | * Copyright 2018, Jaime Cruz |
||
9 | */ |
||
10 | |||
11 | namespace F72X\UblComponent; |
||
12 | |||
13 | use Sabre\Xml\Writer; |
||
14 | |||
15 | class Note extends BaseComponent { |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $languageLocaleID; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $Value; |
||
22 | |||
23 | public function __construct($Value) { |
||
24 | $this->Value = $Value; |
||
25 | } |
||
26 | |||
27 | function xmlSerialize(Writer $writer) { |
||
0 ignored issues
–
show
|
|||
28 | $writer->write([ |
||
29 | 'name' => SchemaNS::CBC . 'Note', |
||
30 | 'value' => $this->Value, |
||
31 | 'attributes' => [ |
||
32 | 'languageLocaleID' => $this->languageLocaleID |
||
33 | ] |
||
34 | ]); |
||
35 | } |
||
36 | |||
37 | public function getLanguageLocaleID() { |
||
38 | return $this->languageLocaleID; |
||
39 | } |
||
40 | |||
41 | public function setLanguageLocaleID($languageLocaleID) { |
||
42 | $this->languageLocaleID = $languageLocaleID; |
||
43 | return $this; |
||
44 | } |
||
45 | |||
46 | public function getValue() { |
||
47 | return $this->Value; |
||
48 | } |
||
49 | |||
50 | public function setValue($Value) { |
||
51 | $this->Value = $Value; |
||
52 | return $this; |
||
53 | } |
||
54 | |||
55 | } |
||
56 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.