protected function getResponse($value, $type, $login = false) { $valueObject = \Zend\XmlRpc\AbstractValue::getXmlRpcValue($value, $type); $content = '<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param>' . $valueObject->saveXml() . '</param></params></methodResponse>'; $this->debug("XML: " . $content); $response = new \Symfony\Component\HttpFoundation\Response(); $response->headers->set('Content-Type', 'text/xml'); $response->setContent($content); $response->setPrivate(); $response->setMaxAge(100); $user = $this->userManager->getCurrentUser(); if ($user->getSymbbType() === 'user') { $response->headers->set('Mobiquo_is_login', "true"); } else { $response->headers->set('Mobiquo_is_login', false); } return $response; }