response = $response; $this->_objectify($this->response->body); } protected function _objectify($fields) { foreach ($fields as $key => $val) { $this->$key = $val; } } }