コード例 #1
0
ファイル: Base.php プロジェクト: rolwi/koala
 function _makeDIMEMessage($xml)
 {
     if (!@(include_once 'Net/DIME.php')) {
         return $this->_raiseSoapFault('DIME messages are unsupported, the Net_DIME package is not installed');
     }
     // Encode any attachments.  See
     // http://search.ietf.org/internet-drafts/draft-nielsen-dime-soap-00.txt
     // Now we have to DIME encode the message
     $dime = new Net_DIME_Message();
     $msg = $dime->encodeData($xml, SOAP_ENVELOP, null, NET_DIME_TYPE_URI);
     // Add the attachments.
     $c = count($this->_attachments);
     for ($i = 0; $i < $c; $i++) {
         $msg .= $dime->encodeData($this->_attachments[$i]['body'], $this->_attachments[$i]['content_type'], $this->_attachments[$i]['cid'], NET_DIME_TYPE_MEDIA);
     }
     $msg .= $dime->endMessage();
     return $msg;
 }
コード例 #2
0
ファイル: Base.php プロジェクト: nidhhoggr/mycoachingoffice
 function &_makeDIMEMessage(&$xml)
 {
     global $SOAP_options;
     if (!isset($SOAP_options['DIME'])) {
         return $this->_raiseSoapFault('DIME is not installed');
     }
     // encode any attachments
     // see http://search.ietf.org/internet-drafts/draft-nielsen-dime-soap-00.txt
     // now we have to DIME encode the message
     $dime = new Net_DIME_Message();
     $msg =& $dime->encodeData($xml, SOAP_ENVELOP, null, NET_DIME_TYPE_URI);
     // add the attachements
     $c = count($this->__attachments);
     for ($i = 0; $i < $c; $i++) {
         $attachment =& $this->__attachments[$i];
         $msg .= $dime->encodeData($attachment['body'], $attachment['content_type'], $attachment['cid'], NET_DIME_TYPE_MEDIA);
     }
     $msg .= $dime->endMessage();
     return $msg;
 }