1 | <?php |
||
13 | class ExchangeRate |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Внутренний код валюты |
||
18 | * @var int |
||
19 | */ |
||
20 | private $id; |
||
21 | |||
22 | /** |
||
23 | * цифровой код |
||
24 | * @var int |
||
25 | */ |
||
26 | private $numCode; |
||
27 | |||
28 | /** |
||
29 | * буквенный код |
||
30 | * @var string |
||
31 | */ |
||
32 | private $charCode; |
||
33 | |||
34 | /** |
||
35 | * номинал |
||
36 | * @var int |
||
37 | */ |
||
38 | private $scale; |
||
39 | |||
40 | /** |
||
41 | * наименование валюты |
||
42 | * @var string |
||
43 | */ |
||
44 | private $name; |
||
45 | |||
46 | /** |
||
47 | * курс |
||
48 | * @var float |
||
49 | */ |
||
50 | private $rate; |
||
51 | |||
52 | /** |
||
53 | * @var \DateTime |
||
54 | */ |
||
55 | private $date; |
||
56 | |||
57 | function __construct(\SimpleXMLElement $xmlElement = null, \DateTime $date = null) |
||
72 | |||
73 | |||
74 | /** |
||
75 | * @return int |
||
76 | */ |
||
77 | public function getId() |
||
81 | |||
82 | /** |
||
83 | * @return int |
||
84 | */ |
||
85 | public function getNumCode() |
||
89 | |||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getCharCode() |
||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getName() |
||
106 | |||
107 | /** |
||
108 | * @return float |
||
109 | */ |
||
110 | public function getRate() |
||
114 | |||
115 | /** |
||
116 | * @return int |
||
117 | */ |
||
118 | public function getScale() |
||
122 | |||
123 | /** |
||
124 | * @return \DateTime |
||
125 | */ |
||
126 | public function getDate() |
||
130 | |||
131 | |||
132 | } |
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.