public function createService()
{
_elgg_services()->setValue('session', $this->session);
_elgg_services()->setValue('config', $this->config);
_elgg_services()->setValue('hooks', $this->hooks);
_elgg_services()->setValue('request', $this->request);
_elgg_services()->setValue('input', $this->input);
_elgg_services()->setValue('amd_config', $this->amd_config);
_elgg_services()->setValue('system_messages', $this->system_messages);
_elgg_services()->setValue('ajax', $this->ajax);
$transport = new \Elgg\Http\OutputBufferTransport();
$this->response_factory = new ResponseFactory($this->request, $this->hooks, $this->ajax, $transport);
_elgg_services()->setValue('responseFactory', $this->response_factory);
return $this->response_factory;
}