예제 #1
0
 /**
  * {@inheritDoc}
  */
 public function convertPhpToXml($data)
 {
     $part = new MimePart($data);
     $contentId = trim($part->getHeader('Content-ID'), '<>');
     $this->soapKernel->addAttachment($part);
     return sprintf('<%s href="%s"/>', $this->getTypeName(), 'cid:' . $contentId);
 }
예제 #2
0
 /**
  * {@inheritDoc}
  */
 public function convertPhpToXml($data)
 {
     $part = new MimePart($data);
     $contentId = trim($part->getHeader('Content-ID'), '<>');
     $this->soapKernel->addAttachment($part);
     $doc = new \DOMDocument();
     $node = $doc->createElement($this->getTypeName());
     $doc->appendChild($node);
     // add xop:Include element
     $xinclude = $doc->createElementNS(Helper::NS_XOP, Helper::PFX_XOP . ':Include');
     $xinclude->setAttribute('href', 'cid:' . $contentId);
     $node->appendChild($xinclude);
     return $doc->saveXML();
 }
예제 #3
0
 /**
  * {@inheritDoc}
  */
 public function filterResponse(CommonSoapResponse $response)
 {
     parent::filterResponse($response);
     $this->attachments = $response->getAttachments();
 }
예제 #4
0
 /**
  * {@inheritDoc}
  */
 public function filterResponse(CommonSoapResponse $response)
 {
     $response->setAttachments($this->attachments);
     $this->attachments = array();
     parent::filterResponse($response);
 }