@@ -17,10 +17,11 @@ discard block |
||
| 17 | 17 | public function import( $_path, $_type = "misc" ) { |
| 18 | 18 | $data = file_get_contents($_path); |
| 19 | 19 | $data = json_decode($data); |
| 20 | - if( $_type == "connection" ) |
|
| 21 | - $this->overlayConnection($data); |
|
| 22 | - else |
|
| 23 | - $this->overlayMisc($data); |
|
| 20 | + if( $_type == "connection" ) { |
|
| 21 | + $this->overlayConnection($data); |
|
| 22 | + } else { |
|
| 23 | + $this->overlayMisc($data); |
|
| 24 | + } |
|
| 24 | 25 | } |
| 25 | 26 | protected function overlayConnection( $_data ) { |
| 26 | 27 | $this->connection = $this->obj2array($_data); |
@@ -40,8 +41,9 @@ discard block |
||
| 40 | 41 | return $return; |
| 41 | 42 | } |
| 42 | 43 | protected function importObject( $_object ) { |
| 43 | - foreach (get_object_vars($_object) as $key => $value) |
|
| 44 | - $this->$key = $value; |
|
| 44 | + foreach (get_object_vars($_object) as $key => $value) { |
|
| 45 | + $this->$key = $value; |
|
| 46 | + } |
|
| 45 | 47 | } |
| 46 | 48 | } |
| 47 | 49 | ?> |