Public Member Functions | |
addAttachment ($data, $filename= '', $contenttype= 'application/octet-stream', $cid=false) | |
clearAttachments () | |
getAttachments () | |
getHTTPBody ($soapmsg) | |
getHTTPContentType () | |
getHTTPContentTypeCharset () | |
parseResponse ($headers, $data) |
soapclientmime::addAttachment | ( | $ | data, | |
$ | filename = '' , |
|||
$ | contenttype = 'application/octet-stream' , |
|||
$ | cid = false | |||
) |
adds a MIME attachment to the current request.
If the $data parameter contains an empty string, this method will read the contents of the file named by the $filename parameter.
If the $cid parameter is false, this method will generate the cid.
string | $data The data of the attachment | |
string | $filename The filename of the attachment (default is empty string) | |
string | $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) | |
string | $cid The content-id (cid) of the attachment (default is false) |
soapclientmime::clearAttachments | ( | ) |
clears the MIME attachments for the current request.
public
soapclientmime::getAttachments | ( | ) |
gets the MIME attachments from the current response.
Each array element in the return is an associative array with keys data, filename, contenttype, cid. These keys correspond to the parameters for addAttachment.
soapclientmime::getHTTPBody | ( | $ | soapmsg | ) |
gets the HTTP body for the current request.
string | $soapmsg The SOAP payload |
soapclientmime::getHTTPContentType | ( | ) |
gets the HTTP content type for the current request.
Note: getHTTPBody must be called before this.
soapclientmime::getHTTPContentTypeCharset | ( | ) |
gets the HTTP content type charset for the current request. returns false for non-text content types.
Note: getHTTPBody must be called before this.
soapclientmime::parseResponse | ( | $ | headers, | |
$ | data | |||
) |
processes SOAP message returned from server
array | $headers The HTTP headers | |
string | $data unprocessed response data from server |