@@ 74-83 (lines=10) @@ | ||
71 | * @param string $key |
|
72 | * @param array $options |
|
73 | */ |
|
74 | protected function setProperty($key, &$options) |
|
75 | { |
|
76 | if (array_key_exists($key, $options)) { |
|
77 | $setter = 'set' . ucfirst($key); |
|
78 | if (method_exists($this, $setter)) { |
|
79 | $this->$setter($options[$key]); |
|
80 | unset($options[$key]); |
|
81 | } |
|
82 | } |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * Конструктор класса |
@@ 70-79 (lines=10) @@ | ||
67 | * @param string $key |
|
68 | * @param array $options |
|
69 | */ |
|
70 | protected function setProperty($key, &$options) |
|
71 | { |
|
72 | if (array_key_exists($key, $options)) { |
|
73 | $setter = 'set' . ucfirst($key); |
|
74 | if (method_exists($this, $setter)) { |
|
75 | $this->$setter($options[$key]); |
|
76 | unset($options[$key]); |
|
77 | } |
|
78 | } |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * @param $options |