EC-CUBE
Public メソッド | 変数
クラス Mail_mimeDecode
Mail_mimeDecodeに対する継承グラフ
Inheritance graph
[凡例]
Mail_mimeDecodeのコラボレーション図
Collaboration graph
[凡例]

Public メソッド

 Mail_mimeDecode ($input)
 decode ($params=null)
 _decode ($headers, $body, $default_ctype= 'text/plain')
getMimeNumbers (&$structure, $no_refs=false, $mime_number= '', $prepend= '')
 _splitBodyHeader ($input)
 _parseHeaders ($input)
 _parseHeaderValue ($input)
 _boundarySplit ($input, $boundary)
 _decodeHeader ($input)
 _decodeBody ($input, $encoding= '7bit')
 _quotedPrintableDecode ($input)
uudecode ($input)
 getSendArray ()
 getXML ($input)
 _getXML ($input, $indent=1)
 _getXML_helper ($hdr_name, $hdr_value, $indent)

変数

 $_input
 $_header
 $_body
 $_error
 $_include_bodies
 $_decode_bodies
 $_decode_headers
 $_rfc822_bodies

関数

_boundarySplit ( input,
boundary 
)

This function splits the input based on the given boundary

引数:
stringInput to parse
戻り値:
array Contains array of resulting mime parts private
_decode ( headers,
body,
default_ctype = 'text/plain' 
)

Performs the decoding. Decodes the body string passed to it If it finds certain content-types it will call itself in a recursive fashion

引数:
stringHeader section
stringBody section
戻り値:
object Results of decoding process private
_decodeBody ( input,
encoding = '7bit' 
)

Given a body string and an encoding type, this function will decode and return it.

引数:
stringInput body to decode
stringEncoding type to use.
戻り値:
string Decoded body private
_decodeHeader ( input)

Given a header, this function will decode it according to RFC2047. Probably not *exactly* conformant, but it does pass all the given examples (in RFC2047).

引数:
stringInput header value to decode
戻り値:
string Decoded header value private
_getXML ( input,
indent = 1 
)

Function that does the actual conversion to xml. Does a single mimepart at a time.

引数:
objectInput to convert to xml. This is a mimepart object. It may or may not contain subparts.
integerNumber of tabs to indent
戻り値:
string XML version of input private
_getXML_helper ( hdr_name,
hdr_value,
indent 
)

Helper function to _getXML(). Returns xml of a header.

引数:
stringName of header
stringValue of header
integerNumber of tabs to indent
戻り値:
string XML version of input private
_parseHeaders ( input)

Parse headers given in $input and return as assoc array.

引数:
stringHeaders to parse
戻り値:
array Contains parsed headers private
_parseHeaderValue ( input)

Function to parse a header value, extract first part, and any secondary parts (after ;) This function is not as robust as it could be. Eg. header comments in the wrong place will probably break it.

引数:
stringHeader value to parse
戻り値:
array Contains parsed result private
_quotedPrintableDecode ( input)

Given a quoted-printable string, this function will decode and return it.

引数:
stringInput body to decode
戻り値:
string Decoded body private
_splitBodyHeader ( input)

Given a string containing a header and body section, this function will split them (at the first blank line) and return them.

引数:
stringInput to split apart
戻り値:
array Contains header and body section private
decode ( params = null)

Begins the decoding process. If called statically it will create an object and call the decode() method of it.

引数:
arrayAn array of various parameters that determine various things: include_bodies - Whether to include the body in the returned object. decode_bodies - Whether to decode the bodies of the parts. (Transfer encoding) decode_headers - Whether to decode headers input - If called statically, this will be treated as the input
戻り値:
object Decoded results public
& getMimeNumbers ( &$  structure,
no_refs = false,
mime_number = '',
prepend = '' 
)

Given the output of the above function, this will return an array of references to the parts, indexed by mime number.

引数:
object$structureThe structure to go through
string$mime_numberInternal use only.
戻り値:
array Mime numbers

getSendArray() returns the arguments required for Mail::send() used to build the arguments for a mail::send() call

Usage: $mailtext = Full email (for example generated by a template) $decoder = new Mail_mimeDecode($mailtext); $parts = $decoder->getSendArray(); if (!PEAR::isError($parts) { list($recipents,$headers,$body) = $parts; $mail = Mail::factory('smtp'); $mail->send($recipents,$headers,$body); } else { echo $parts->message; }

戻り値:
mixed array of recipeint, headers,body or Pear_Error public
作者:
Alan Knowles <alan@akbkhome.com>
getXML ( input)

Returns a xml copy of the output of Mail_mimeDecode::decode. Pass the output in as the argument. This function can be called statically. Eg:

$output = $obj->decode(); $xml = Mail_mimeDecode::getXML($output);

The DTD used for this should have been in the package. Or alternatively you can get it from cvs, or here: http://www.phpguru.org/xmail/xmail.dtd.

引数:
objectInput to convert to xml. This should be the output of the Mail_mimeDecode::decode function
戻り値:
string XML version of input public
Mail_mimeDecode ( input)

Constructor.

Sets up the object, initialise the variables, and splits and stores the header and body of the input.

引数:
stringThe input to decode public
& uudecode ( input)

Checks the input for uuencoded files and returns an array of them. Can be called statically, eg:

$files =& Mail_mimeDecode::uudecode($some_text);

It will check for the begin 666 ... end syntax however and won't just blindly decode whatever you pass it.

引数:
stringInput body to look for attahcments in
戻り値:
array Decoded bodies, filenames and permissions public
作者:
Unknown

このクラスの説明は次のファイルから生成されました:
 全て データ構造 ネームスペース 関数 変数