@@ 22-33 (lines=12) @@ | ||
19 | * @inheritdoc |
|
20 | * @throws \yii\base\UnknownPropertyException |
|
21 | */ |
|
22 | public function __get($name) |
|
23 | { |
|
24 | try { |
|
25 | return parent::__get($name); |
|
26 | } catch (\yii\base\UnknownPropertyException $e) { |
|
27 | if (isset($this["vnp_$name"])) { |
|
28 | return $this["vnp_$name"]; |
|
29 | } else { |
|
30 | throw $e; |
|
31 | } |
|
32 | } |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * @inheritdoc |
|
@@ 39-50 (lines=12) @@ | ||
36 | * @inheritdoc |
|
37 | * @throws \yii\base\UnknownPropertyException |
|
38 | */ |
|
39 | public function __set($name, $value) |
|
40 | { |
|
41 | try { |
|
42 | parent::__set($name, $value); |
|
43 | } catch (\yii\base\UnknownPropertyException $e) { |
|
44 | if (isset($this["vnp_$name"])) { |
|
45 | $this["vnp_$name"] = $value; |
|
46 | } else { |
|
47 | throw $e; |
|
48 | } |
|
49 | } |
|
50 | } |
|
51 | ||
52 | } |
|
53 |