soapclientmime Class Reference

List of all members.

Public Member Functions

 addAttachment ($data, $filename= '', $contenttype= 'application/octet-stream', $cid=false)
 clearAttachments ()
 getAttachments ()
 getHTTPBody ($soapmsg)
 getHTTPContentType ()
 getHTTPContentTypeCharset ()
 parseResponse ($headers, $data)

Detailed Description

soapclientmime client supporting MIME attachments defined at http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library.

Author:
Scott Nichol <snichol@sourceforge.net>

Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list

Version:
$Id$ public


Member Function Documentation

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.

Parameters:
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)
Returns:
string The content-id (cid) of the attachment public

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.

Returns:
array The attachments. public

soapclientmime::getHTTPBody ( soapmsg  ) 

gets the HTTP body for the current request.

Parameters:
string $soapmsg The SOAP payload
Returns:
string The HTTP body, which includes the SOAP payload private

soapclientmime::getHTTPContentType (  ) 

gets the HTTP content type for the current request.

Note: getHTTPBody must be called before this.

Returns:
string the HTTP content type for the current request. private

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.

Returns:
string the HTTP content type charset for the current request. private

soapclientmime::parseResponse ( headers,
data 
)

processes SOAP message returned from server

Parameters:
array $headers The HTTP headers
string $data unprocessed response data from server
Returns:
mixed value of the message, decoded into a PHP type private


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:18 2006 for XOOPS Cube Legacy by  doxygen 1.5.1