Total Complexity | 15 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class Price extends Simple |
||
18 | { |
||
19 | protected $type; |
||
20 | |||
21 | public function __get($name) |
||
22 | { |
||
23 | if ($result = parent::__get($name)) { |
||
24 | if ($this->type && ($value = $this->type->{$name})) { |
||
25 | return $value; |
||
26 | } |
||
27 | } |
||
28 | return $result; |
||
29 | } |
||
30 | |||
31 | public function __set($name, $value) |
||
32 | { |
||
33 | } |
||
34 | |||
35 | public function __isset($name) |
||
36 | { |
||
37 | } |
||
38 | |||
39 | public function defaultProperties() |
||
40 | { |
||
41 | return [ |
||
42 | 'Представление' => 'performance', |
||
43 | 'ИдТипаЦены' => 'id', |
||
44 | 'ЦенаЗаЕдиницу' => 'cost', |
||
45 | 'Валюта' => 'currency', |
||
46 | 'Единица' => 'unit', |
||
47 | 'Коэффициент' => 'rate', |
||
48 | ]; |
||
49 | } |
||
50 | |||
51 | public function getType() |
||
59 | } |
||
60 | |||
61 | public function init() |
||
70 | } |
||
71 | } |