public function getXMLforMethod($method, $data) { $this->returnRequest = TRUE; $this->{$method}($data); $this->returnRequest = FALSE; return $this->lastRequest; }