Ejemplo n.º 1
0
 public function toResponse()
 {
     $response = parent::toResponse();
     $response->setHeader('Content-Type', 'application/xml; charset="utf-8"');
     $response->setEntity(function (StreamInterface $stream) {
         $xml = new XmlStreamWriter(new StreamWrapper($stream));
         $xml->registerNamespace(WebDav::NS_DAV, 'D');
         $xml->startDocument();
         $xml->startElement(WebDav::NS_DAV, 'error');
         $this->toXml($xml);
         $xml->endElement();
         // D:error
         $xml->endDocument();
         $xml->flush();
     });
     return $response;
 }
Ejemplo n.º 2
0
 public function toResponse()
 {
     $response = parent::toResponse();
     $response->setEntity($this->entity);
     return $response;
 }
Ejemplo n.º 3
0
 public function toResponse()
 {
     $response = parent::toResponse();
     $response->setHeader(new AllowHeader($this->allow));
     return $response;
 }