@@ -18,11 +18,21 @@ |
||
18 | 18 | |
19 | 19 | public function __construct(array $config) |
20 | 20 | { |
21 | - if (array_key_exists('api_key', $config)) $this->_api_key = $config['api_key']; |
|
22 | - if (array_key_exists('api_secret', $config)) $this->_api_secret = $config['api_secret']; |
|
23 | - if (array_key_exists('app_id', $config)) $this->_app_id = $config['app_id']; |
|
24 | - if (array_key_exists('app_secret', $config)) $this->_app_secret = $config['app_secret']; |
|
25 | - if (array_key_exists('site_key', $config)) $this->setSiteKey($config['site_key']); |
|
21 | + if (array_key_exists('api_key', $config)) { |
|
22 | + $this->_api_key = $config['api_key']; |
|
23 | + } |
|
24 | + if (array_key_exists('api_secret', $config)) { |
|
25 | + $this->_api_secret = $config['api_secret']; |
|
26 | + } |
|
27 | + if (array_key_exists('app_id', $config)) { |
|
28 | + $this->_app_id = $config['app_id']; |
|
29 | + } |
|
30 | + if (array_key_exists('app_secret', $config)) { |
|
31 | + $this->_app_secret = $config['app_secret']; |
|
32 | + } |
|
33 | + if (array_key_exists('site_key', $config)) { |
|
34 | + $this->setSiteKey($config['site_key']); |
|
35 | + } |
|
26 | 36 | } |
27 | 37 | |
28 | 38 | /** |