@@ 143-146 (lines=4) @@ | ||
140 | } |
|
141 | ||
142 | public function fromArray($array) { |
|
143 | foreach ( $this as $key => $value ) { |
|
144 | if(array_key_exists($key, $array)===true) |
|
145 | $this->_callSetter("set" . ucfirst($key), $key, $array[$key], $array); |
|
146 | } |
|
147 | foreach ( $array as $key => $value ) { |
|
148 | if($this->_callSetter($key, $key, $value, $array)===false){ |
|
149 | $this->_callSetter("set" . ucfirst($key), $key, $value, $array); |
|
@@ 147-151 (lines=5) @@ | ||
144 | if(array_key_exists($key, $array)===true) |
|
145 | $this->_callSetter("set" . ucfirst($key), $key, $array[$key], $array); |
|
146 | } |
|
147 | foreach ( $array as $key => $value ) { |
|
148 | if($this->_callSetter($key, $key, $value, $array)===false){ |
|
149 | $this->_callSetter("set" . ucfirst($key), $key, $value, $array); |
|
150 | } |
|
151 | } |
|
152 | return $array; |
|
153 | } |
|
154 |