PHP 클래스 Horde_Mime_Part, horde

저자: Chuck Hagenbuch ([email protected])
저자: Michael Slusarz ([email protected])
상속: implements ArrayAccess, implements Countable, implements RecursiveIterator, implements Serializable
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultCharset string The default charset to use when parsing text parts with no charset information.
$encodingTypes
$memoryLimit integer The memory limit for use with the PHP temp stream.
$mimeTypes
$parent Horde_Mime_Part Parent object. Value only accurate when iterating.

보호된 프로퍼티들

프로퍼티 타입 설명
$_bytes integer Default value for this Part's size.
$_contents resource The body of the part. Always stored in binary format.
$_eol string The default is currently to output the EOL sequence internally as just "\n" instead of the canonical "\r\n" required in RFC 822 & 2045. To be RFC complaint, the full EOL combination should be used when sending a message.
$_failed boolean Flag to detect if a message failed to send at least once.
$_hdrCharset string The charset to output the headers in.
$_headers Horde_Mime_Headers The MIME headers for this part.
$_metadata array Metadata.
$_mimeid string The MIME ID of this part.
$_parts array The subparts of this part.
$_status integer Status mask for this part.
$_temp array Temporary array.
$_transferEncoding string The desired transfer encoding of this part.

공개 메소드들

메소드 설명
__clone ( ) Function to run on clone.
__construct ( ) Constructor.
addMimeHeaders ( array $options = [] ) : Horde_Mime_Headers Returns a Horde_Mime_Header object containing all MIME headers needed for the part.
addPart ( $mime_part )
alterPart ( $id, $mime_part )
appendContents ( mixed $contents, $options = [] ) Add to the body contents of this part.
buildMimeIds ( string $id = null, boolean $rfc822 = false ) Build the MIME IDs for this part and all subparts.
clearContentTypeParameter ( $label )
clearContents ( ) Clears the body contents of this part.
contentTypeMap ( $sort = true )
count ( ) : integer Returns the number of child message parts (doesn't include grandchildren or more remote ancestors).
current ( )
findBody ( string $subtype = null ) : mixed Finds the main "body" text part (if any) in a message.
getAllContentTypeParameters ( ) : array Get all parameters from the Content-Type header.
getAllDispositionParameters ( ) : array Get all parameters from the Content-Disposition header.
getBytes ( boolean $approx = false ) : integer Determine the size of this MIME part and its child members.
getCharset ( ) : string Get the character set to use for this part.
getChildren ( )
getContentId ( ) : string Returns the Content-ID for this part.
getContentTypeParameter ( string $label ) : string Get a content type parameter from this part.
getContents ( array $options = [] ) : mixed Return the body of the part.
getDefaultType ( ) : string If the subtype of a MIME part is unrecognized by an application, the default type should be used instead (See RFC 2046). This method returns the default subtype for a particular primary MIME type.
getDescription ( boolean $default = false ) : string Get the description of this part.
getDisposition ( ) : string Get the content-disposition of this part.
getDispositionParameter ( string $label ) : string Get a disposition parameter from this part.
getDuration ( ) : integer Get the content duration of the data contained in this part (see RFC 3803).
getEOL ( ) : string Get the string to use for EOLs.
getHeaderCharset ( ) : string Get the character set to use when outputting MIME headers.
getLanguage ( ) Get the language(s) of this part.
getMetadata ( string $key ) : mixed Retrieves metadata from this object.
getMimeId ( ) : string Returns the MIME ID of this part.
getName ( boolean $default = false ) : string Get the name of this part.
getPart ( $id )
getPartByIndex ( $index ) : Horde_Mime_Part Returns a subpart by index.
getParts ( ) : array Get a list of all MIME subparts.
getPrimaryType ( ) : string Get the primary type of this part.
getRawPartText ( mixed $text, string $type, string $id ) : string Attempts to obtain the raw text of a MIME part.
getSize ( boolean $approx = false ) : string Output the size of this MIME part in KB.
getSubType ( ) : string Get the subtype of this part.
getType ( boolean $charset = false ) : string Get the full MIME Content-Type of this part.
hasChildren ( )
isAttachment ( ) : boolean Determines if this MIME part is an attachment for display purposes.
isBasePart ( boolean $base ) Is this the base MIME part?
key ( )
next ( )
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
parseMessage ( string $text, array $opts = [] ) : Horde_Mime_Part Attempts to build a Horde_Mime_Part object from message text.
partIterator ( boolean $current = true ) : Iterator Returns the recursive iterator needed to iterate through this part.
removePart ( $id )
replaceEOL ( mixed $text, string $eol = null, boolean $stream = false ) : string Replace newlines in this part's contents with those specified by either the given newline sequence or the part's current EOL setting.
rewind ( )
send ( string $email, Horde_Mime_Headers $headers, Horde_Mail_Transport $mailer, array $opts = [] ) Sends this message.
serialize ( ) : string Serialization.
setBytes ( integer $bytes ) Explicitly set the size (in bytes) of this part. This value will only be returned (via getBytes()) if there are no contents currently set.
setCharset ( string $charset ) Set the character set of this part.
setContentId ( string $cid = null ) : string Sets the Content-ID header for this part.
setContentTypeParameter ( string $label, string $data ) Add/remove a content type parameter to this part.
setContents ( mixed $contents, array $options = [] ) Set the body contents of this part.
setDescription ( string $description ) Set the description of this part.
setDisposition ( string $disposition = null ) Set the content-disposition of this part.
setDispositionParameter ( string $label, string $data ) Add a disposition parameter to this part.
setDuration ( integer $duration ) Set the content duration of the data contained in this part (see RFC 3803).
setEOL ( string $eol ) Sets a new string to use for EOLs.
setHeaderCharset ( string $charset ) Set the character set to use when outputting MIME headers.
setLanguage ( mixed $lang ) Set the language(s) of this part.
setMetadata ( string $key, mixed $data = null ) Set a piece of metadata on this object.
setMimeId ( string $mimeid ) Alter the MIME ID of this part.
setName ( string $name ) Set the name of this part.
setTransferEncoding ( string $encoding, array $options = [] ) Set the transfer encoding to use for this part.
setType ( string $type ) Set the MIME type of this part.
toString ( array $options = [] ) : mixed Return the entire part in MIME format.
unserialize ( string $data ) Unserialization.
valid ( )

보호된 메소드들

메소드 설명
_findBoundary ( string $text, integer $pos, string $boundary, integer $end = null ) : array Find the location of the next boundary string.
_findHeader ( string $text, string $eol ) : integer Find the location of the end of the header text.
_getStructure ( string $header, string $body, array $opts = [] ) : Horde_Mime_Part Creates a MIME object from the text of one part of a MIME message.
_getTransferEncoding ( integer $encode = self::ENCODE_7BIT ) : string Get the transfer encoding for the part based on the user requested transfer encoding and the current contents of the part.
_reEncodeMessageAttachment ( Horde_Mime_Part $part ) Rebuilds $part and forces it to be a base64 encoded application/octet-stream part.
_readStream ( resource $fp, boolean $close = false ) : string Read data from a stream.
_reindex ( boolean $force = false ) Reindexes the MIME IDs, if necessary.
_sanityCheckRfc822Attachments ( ) Re-enocdes message/rfc822 parts in case there was e.g., some broken line length in the headers of the message in the part. Since we shouldn't alter the original message in any way, we simply reset cause the part to be encoded as base64 and sent as a application/octet part.
_scanStream ( resource $fp ) Scans a stream for content type.
_transferDecode ( resource $fp, string $encoding ) : resource Decodes the contents of the part to binary encoding.
_transferEncode ( resource $fp, string $encoding ) : resource Encodes the contents of the part as necessary for transport.
_writeStream ( array $data, array $options = [] ) : resource Write data to a stream.

메소드 상세

__clone() 공개 메소드

Function to run on clone.
public __clone ( )

__construct() 공개 메소드

Constructor.
public __construct ( )

_findBoundary() 보호된 정적인 메소드

Find the location of the next boundary string.
protected static _findBoundary ( string $text, integer $pos, string $boundary, integer $end = null ) : array
$text string The text to search.
$pos integer The current position in $text.
$boundary string The boundary string.
$end integer If set, return after matching this many boundaries.
리턴 array Keys are the boundary number, values are an array with two elements: 'start' and 'length'.

_findHeader() 보호된 정적인 메소드

Find the location of the end of the header text.
protected static _findHeader ( string $text, string $eol ) : integer
$text string The text to search.
$eol string The EOL string.
리턴 integer Header position.

_getStructure() 보호된 정적인 메소드

Creates a MIME object from the text of one part of a MIME message.
protected static _getStructure ( string $header, string $body, array $opts = [] ) : Horde_Mime_Part
$header string The header text.
$body string The body text.
$opts array Additional options:
  - ctype: (string) The default content-type.
  - forcemime: (boolean) If true, the message data is assumed to be
               MIME data. If not, a MIME-Version header must exist to
               be parsed as a MIME message.
  - level: (integer) Current nesting level.
  - no_body: (boolean) If true, don't set body contents of parts.
리턴 Horde_Mime_Part The MIME part object.

_getTransferEncoding() 보호된 메소드

Get the transfer encoding for the part based on the user requested transfer encoding and the current contents of the part.
protected _getTransferEncoding ( integer $encode = self::ENCODE_7BIT ) : string
$encode integer A mask of allowable encodings.
리턴 string The transfer-encoding of this part.

_reEncodeMessageAttachment() 보호된 메소드

Rebuilds $part and forces it to be a base64 encoded application/octet-stream part.
protected _reEncodeMessageAttachment ( Horde_Mime_Part $part )
$part Horde_Mime_Part The MIME part.

_readStream() 보호된 메소드

Read data from a stream.
protected _readStream ( resource $fp, boolean $close = false ) : string
$fp resource An active stream.
$close boolean Close the stream when done reading?
리턴 string The data from the stream.

_reindex() 보호된 메소드

Reindexes the MIME IDs, if necessary.
protected _reindex ( boolean $force = false )
$force boolean Reindex if the current part doesn't have an ID.

_sanityCheckRfc822Attachments() 보호된 메소드

Re-enocdes message/rfc822 parts in case there was e.g., some broken line length in the headers of the message in the part. Since we shouldn't alter the original message in any way, we simply reset cause the part to be encoded as base64 and sent as a application/octet part.

_scanStream() 보호된 메소드

Scans a stream for content type.
protected _scanStream ( resource $fp )
$fp resource A stream resource.

_transferDecode() 보호된 메소드

Decodes the contents of the part to binary encoding.
protected _transferDecode ( resource $fp, string $encoding ) : resource
$fp resource A stream containing the data to decode.
$encoding string The original file encoding.
리턴 resource A new file resource with the decoded data.

_transferEncode() 보호된 메소드

Encodes the contents of the part as necessary for transport.
protected _transferEncode ( resource $fp, string $encoding ) : resource
$fp resource A stream containing the data to encode.
$encoding string The encoding to use.
리턴 resource A new file resource with the encoded data.

_writeStream() 보호된 메소드

Write data to a stream.
protected _writeStream ( array $data, array $options = [] ) : resource
$data array The data to write. Either a stream resource or a string.
$options array Additional options: - error: (boolean) Catch errors when writing to the stream. Throw an ErrorException if an error is found. DEFAULT: false - filter: (array) Filter(s) to apply to the string. Keys are the filter names, values are filter params. - fp: (resource) Use this stream instead of creating a new one.
리턴 resource The stream resource.

addMimeHeaders() 공개 메소드

Returns a Horde_Mime_Header object containing all MIME headers needed for the part.
public addMimeHeaders ( array $options = [] ) : Horde_Mime_Headers
$options array Additional options: - encode: (integer) A mask of allowable encodings. DEFAULT: Auto-determined - headers: (Horde_Mime_Headers) The object to add the MIME headers to. DEFAULT: Add headers to a new object
리턴 Horde_Mime_Headers A Horde_Mime_Headers object.

addPart() 공개 메소드

사용 중단: Use array access instead.
public addPart ( $mime_part )

alterPart() 공개 메소드

사용 중단: Use array access instead.
public alterPart ( $id, $mime_part )

appendContents() 공개 메소드

Add to the body contents of this part.
public appendContents ( mixed $contents, $options = [] )
$contents mixed The part body. Either a string or a stream resource, or an array containing both. - encoding: (string) The encoding of $contents. DEFAULT: Current transfer encoding value. - usestream: (boolean) If $contents is a stream, should we directly use that stream? DEFAULT: $contents copied to a new stream.

buildMimeIds() 공개 메소드

Build the MIME IDs for this part and all subparts.
public buildMimeIds ( string $id = null, boolean $rfc822 = false )
$id string The ID of this part.
$rfc822 boolean Is this a message/rfc822 part?

clearContentTypeParameter() 공개 메소드

사용 중단: Use setContentTypeParameter with a null $data value.
public clearContentTypeParameter ( $label )

clearContents() 공개 메소드

Clears the body contents of this part.
public clearContents ( )

contentTypeMap() 공개 메소드

사용 중단: Use iterator instead.
public contentTypeMap ( $sort = true )

count() 공개 메소드

Returns the number of child message parts (doesn't include grandchildren or more remote ancestors).
public count ( ) : integer
리턴 integer Number of message parts.

current() 공개 메소드

부터: 2.8.0
public current ( )

findBody() 공개 메소드

"Body" data is the first text part under this part.
public findBody ( string $subtype = null ) : mixed
$subtype string Specifically search for this subtype.
리턴 mixed The MIME ID of the main body part, or null if a body part is not found.

getAllContentTypeParameters() 공개 메소드

Get all parameters from the Content-Type header.
public getAllContentTypeParameters ( ) : array
리턴 array An array of all the parameters Returns the empty array if no parameters set.

getAllDispositionParameters() 공개 메소드

Get all parameters from the Content-Disposition header.
public getAllDispositionParameters ( ) : array
리턴 array An array of all the parameters Returns the empty array if no parameters set.

getBytes() 공개 메소드

Determine the size of this MIME part and its child members.
public getBytes ( boolean $approx = false ) : integer
$approx boolean If true, determines an approximate size for parts consisting of base64 encoded data.
리턴 integer Size of the part, in bytes.

getCharset() 공개 메소드

Get the character set to use for this part.
public getCharset ( ) : string
리턴 string The character set of this part (lowercase). Returns null if there is no character set.

getChildren() 공개 메소드

부터: 2.8.0
public getChildren ( )

getContentId() 공개 메소드

Returns the Content-ID for this part.
public getContentId ( ) : string
리턴 string The Content-ID for this part (null if not set).

getContentTypeParameter() 공개 메소드

Get a content type parameter from this part.
public getContentTypeParameter ( string $label ) : string
$label string The content type parameter label.
리턴 string The data requested. Returns null if $label is not set.

getContents() 공개 메소드

Return the body of the part.
public getContents ( array $options = [] ) : mixed
$options array Additional options: - canonical: (boolean) Returns the contents in strict RFC 822 & 2045 output - namely, all newlines end with the canonical sequence. DEFAULT: No - stream: (boolean) Return the body as a stream resource. DEFAULT: No
리턴 mixed The body text (string) of the part, null if there is no contents, and a stream resource if 'stream' is true.

getDefaultType() 공개 메소드

If the subtype of a MIME part is unrecognized by an application, the default type should be used instead (See RFC 2046). This method returns the default subtype for a particular primary MIME type.
public getDefaultType ( ) : string
리턴 string The default MIME type of this part (ex.: text/plain).

getDescription() 공개 메소드

Get the description of this part.
public getDescription ( boolean $default = false ) : string
$default boolean If the description parameter doesn't exist, should we use the name of the part?
리턴 string The description of this part.

getDisposition() 공개 메소드

Get the content-disposition of this part.
public getDisposition ( ) : string
리턴 string The part's content-disposition. An empty string means no desired disposition has been set for this part.

getDispositionParameter() 공개 메소드

Get a disposition parameter from this part.
public getDispositionParameter ( string $label ) : string
$label string The disposition parameter label.
리턴 string The data requested. Returns null if $label is not set.

getDuration() 공개 메소드

Get the content duration of the data contained in this part (see RFC 3803).
public getDuration ( ) : integer
리턴 integer The duration of the data, in seconds. Returns null if there is no duration information.

getEOL() 공개 메소드

Get the string to use for EOLs.
public getEOL ( ) : string
리턴 string The string to use for EOLs.

getHeaderCharset() 공개 메소드

Get the character set to use when outputting MIME headers.
public getHeaderCharset ( ) : string
리턴 string The character set. If no preferred character set has been set, returns null.

getLanguage() 공개 메소드

Get the language(s) of this part.
public getLanguage ( )

getMetadata() 공개 메소드

Retrieves metadata from this object.
public getMetadata ( string $key ) : mixed
$key string The metadata key.
리턴 mixed The metadata, or null if it doesn't exist.

getMimeId() 공개 메소드

Returns the MIME ID of this part.
public getMimeId ( ) : string
리턴 string The MIME ID.

getName() 공개 메소드

Get the name of this part.
public getName ( boolean $default = false ) : string
$default boolean If the name parameter doesn't exist, should we use the default name from the description parameter?
리턴 string The name of the part.

getPart() 공개 메소드

사용 중단: Use array access instead.
public getPart ( $id )

getPartByIndex() 공개 메소드

Returns a subpart by index.
public getPartByIndex ( $index ) : Horde_Mime_Part
리턴 Horde_Mime_Part Part, or null if not found.

getParts() 공개 메소드

Get a list of all MIME subparts.
public getParts ( ) : array
리턴 array An array of the Horde_Mime_Part subparts.

getPrimaryType() 공개 메소드

Get the primary type of this part.
public getPrimaryType ( ) : string
리턴 string The primary MIME type of this part.

getRawPartText() 공개 정적인 메소드

Attempts to obtain the raw text of a MIME part.
public static getRawPartText ( mixed $text, string $type, string $id ) : string
$text mixed The full text of the MIME message. The text is assumed to be MIME data (no MIME-Version checking is performed). It can be either a stream or a string.
$type string Either 'header' or 'body'.
$id string The MIME ID.
리턴 string The raw text.

getSize() 공개 메소드

Output the size of this MIME part in KB.
public getSize ( boolean $approx = false ) : string
$approx boolean If true, determines an approximate size for parts consisting of base64 encoded data.
리턴 string Size of the part in KB.

getSubType() 공개 메소드

Get the subtype of this part.
public getSubType ( ) : string
리턴 string The MIME subtype of this part.

getType() 공개 메소드

Get the full MIME Content-Type of this part.
public getType ( boolean $charset = false ) : string
$charset boolean Append character set information to the end of the content type if this is a text/* part? `
리턴 string The MIME type of this part.

hasChildren() 공개 메소드

부터: 2.8.0
public hasChildren ( )

isAttachment() 공개 메소드

Determines if this MIME part is an attachment for display purposes.
public isAttachment ( ) : boolean
리턴 boolean True if this part should be considered an attachment.

isBasePart() 공개 메소드

Is this the base MIME part?
public isBasePart ( boolean $base )
$base boolean True if this is the base MIME part.

key() 공개 메소드

부터: 2.8.0
public key ( )

next() 공개 메소드

부터: 2.8.0
public next ( )

offsetExists() 공개 메소드

public offsetExists ( $offset )

offsetGet() 공개 메소드

public offsetGet ( $offset )

offsetSet() 공개 메소드

public offsetSet ( $offset, $value )

offsetUnset() 공개 메소드

public offsetUnset ( $offset )

parseMessage() 공개 정적인 메소드

Attempts to build a Horde_Mime_Part object from message text.
public static parseMessage ( string $text, array $opts = [] ) : Horde_Mime_Part
$text string The text of the MIME message.
$opts array Additional options: - forcemime: (boolean) If true, the message data is assumed to be MIME data. If not, a MIME-Version header must exist (RFC 2045 [4]) to be parsed as a MIME message. DEFAULT: false - level: (integer) Current nesting level of the MIME data. DEFAULT: 0 - no_body: (boolean) If true, don't set body contents of parts (since 2.2.0). DEFAULT: false
리턴 Horde_Mime_Part A MIME Part object.

partIterator() 공개 메소드

Returns the recursive iterator needed to iterate through this part.
부터: 2.8.0
public partIterator ( boolean $current = true ) : Iterator
$current boolean Include the current part as the base?
리턴 Iterator Recursive iterator.

removePart() 공개 메소드

사용 중단: Use array access instead.
public removePart ( $id )

replaceEOL() 공개 메소드

Replace newlines in this part's contents with those specified by either the given newline sequence or the part's current EOL setting.
public replaceEOL ( mixed $text, string $eol = null, boolean $stream = false ) : string
$text mixed The text to replace. Either a string or a stream resource. If a stream, and returning a string, will close the stream when done.
$eol string The EOL sequence to use. If not present, uses the part's current EOL setting.
$stream boolean If true, returns a stream resource.
리턴 string The text with the newlines replaced by the desired newline sequence (returned as a stream resource if $stream is true).

rewind() 공개 메소드

부터: 2.8.0
public rewind ( )

send() 공개 메소드

Sends this message.
public send ( string $email, Horde_Mime_Headers $headers, Horde_Mail_Transport $mailer, array $opts = [] )
$email string The address list to send to.
$headers Horde_Mime_Headers The Horde_Mime_Headers object holding this message's headers.
$mailer Horde_Mail_Transport A Horde_Mail_Transport object.
$opts array Additional options:
  - broken_rfc2231: (boolean) Attempt to work around non-RFC
                    2231-compliant MUAs by generating both a RFC
                    2047-like parameter name and also the correct RFC
                    2231 parameter (@since 2.5.0).
                    DEFAULT: false
  - encode: (integer) The encoding to use. A mask of self::ENCODE_*
            values.
            DEFAULT: Auto-determined based on transport driver.

serialize() 공개 메소드

Serialization.
public serialize ( ) : string
리턴 string Serialized data.

setBytes() 공개 메소드

This function is useful for setting the size of the part when the contents of the part are not fully loaded (i.e. creating a Horde_Mime_Part object from IMAP header information without loading the data of the part).
public setBytes ( integer $bytes )
$bytes integer The size of this part in bytes.

setCharset() 공개 메소드

Set the character set of this part.
public setCharset ( string $charset )
$charset string The character set of this part.

setContentId() 공개 메소드

Sets the Content-ID header for this part.
public setContentId ( string $cid = null ) : string
$cid string Use this CID (if not already set). Else, generate a random CID.
리턴 string The Content-ID for this part.

setContentTypeParameter() 공개 메소드

Add/remove a content type parameter to this part.
public setContentTypeParameter ( string $label, string $data )
$label string The content-type parameter label.
$data string The content-type parameter data. If null, removes the parameter (@since 2.8.0).

setContents() 공개 메소드

Set the body contents of this part.
public setContents ( mixed $contents, array $options = [] )
$contents mixed The part body. Either a string or a stream resource, or an array containing both.
$options array Additional options: - encoding: (string) The encoding of $contents. DEFAULT: Current transfer encoding value. - usestream: (boolean) If $contents is a stream, should we directly use that stream? DEFAULT: $contents copied to a new stream.

setDescription() 공개 메소드

Set the description of this part.
public setDescription ( string $description )
$description string The description of this part. If null, deletes the description (@since 2.8.0).

setDisposition() 공개 메소드

Set the content-disposition of this part.
public setDisposition ( string $disposition = null )
$disposition string The content-disposition to set ('inline', 'attachment', or an empty value).

setDispositionParameter() 공개 메소드

Add a disposition parameter to this part.
public setDispositionParameter ( string $label, string $data )
$label string The disposition parameter label.
$data string The disposition parameter data. If null, removes the parameter (@since 2.8.0).

setDuration() 공개 메소드

Set the content duration of the data contained in this part (see RFC 3803).
public setDuration ( integer $duration )
$duration integer The duration of the data, in seconds. If null, clears the duration information.

setEOL() 공개 메소드

Sets a new string to use for EOLs.
public setEOL ( string $eol )
$eol string The string to use for EOLs.

setHeaderCharset() 공개 메소드

Set the character set to use when outputting MIME headers.
public setHeaderCharset ( string $charset )
$charset string The character set.

setLanguage() 공개 메소드

Set the language(s) of this part.
public setLanguage ( mixed $lang )
$lang mixed A language string, or an array of language strings.

setMetadata() 공개 메소드

Set a piece of metadata on this object.
public setMetadata ( string $key, mixed $data = null )
$key string The metadata key.
$data mixed The metadata. If null, clears the key.

setMimeId() 공개 메소드

Alter the MIME ID of this part.
public setMimeId ( string $mimeid )
$mimeid string The MIME ID.

setName() 공개 메소드

Set the name of this part.
public setName ( string $name )
$name string The name to set.

setTransferEncoding() 공개 메소드

Only needed in the following circumstances: 1.) Indicate what the transfer encoding is if the data has not yet been set in the object (can only be set if there presently are not any contents). 2.) Force the encoding to a certain type on a toString() call (if 'send' is true).
public setTransferEncoding ( string $encoding, array $options = [] )
$encoding string The transfer encoding to use.
$options array Additional options: - send: (boolean) If true, use $encoding as the sending encoding. DEFAULT: $encoding is used to change the base encoding.

setType() 공개 메소드

Set the MIME type of this part.
public setType ( string $type )
$type string The MIME type to set (ex.: text/plain).

toString() 공개 메소드

Return the entire part in MIME format.
public toString ( array $options = [] ) : mixed
$options array Additional options: - canonical: (boolean) Returns the encoded part in strict RFC 822 & 2045 output - namely, all newlines end with the canonical sequence. DEFAULT: false - defserver: (string) The default server to use when creating the header string. DEFAULT: none - encode: (integer) A mask of allowable encodings. DEFAULT: self::ENCODE_7BIT - headers: (mixed) Include the MIME headers? If true, create a new headers object. If a Horde_Mime_Headers object, add MIME headers to this object. If a string, use the string verbatim. DEFAULT: true - id: (string) Return only this MIME ID part. DEFAULT: Returns the base part. - stream: (boolean) Return a stream resource. DEFAULT: false
리턴 mixed The MIME string (returned as a resource if $stream is true).

unserialize() 공개 메소드

Unserialization.
public unserialize ( string $data )
$data string Serialized data.

valid() 공개 메소드

부터: 2.8.0
public valid ( )

프로퍼티 상세

$_bytes 보호되어 있는 프로퍼티

Default value for this Part's size.
protected int $_bytes
리턴 integer

$_contents 보호되어 있는 프로퍼티

The body of the part. Always stored in binary format.
protected resource $_contents
리턴 resource

$_eol 보호되어 있는 프로퍼티

The default is currently to output the EOL sequence internally as just "\n" instead of the canonical "\r\n" required in RFC 822 & 2045. To be RFC complaint, the full EOL combination should be used when sending a message.
protected string $_eol
리턴 string

$_failed 보호되어 있는 프로퍼티

Flag to detect if a message failed to send at least once.
protected bool $_failed
리턴 boolean

$_hdrCharset 보호되어 있는 프로퍼티

The charset to output the headers in.
protected string $_hdrCharset
리턴 string

$_headers 보호되어 있는 프로퍼티

The MIME headers for this part.
protected Horde_Mime_Headers $_headers
리턴 Horde_Mime_Headers

$_metadata 보호되어 있는 프로퍼티

Metadata.
protected array $_metadata
리턴 array

$_mimeid 보호되어 있는 프로퍼티

The MIME ID of this part.
protected string $_mimeid
리턴 string

$_parts 보호되어 있는 프로퍼티

The subparts of this part.
protected array $_parts
리턴 array

$_status 보호되어 있는 프로퍼티

Status mask for this part.
protected int $_status
리턴 integer

$_temp 보호되어 있는 프로퍼티

Temporary array.
protected array $_temp
리턴 array

$_transferEncoding 보호되어 있는 프로퍼티

The desired transfer encoding of this part.
protected string $_transferEncoding
리턴 string

$defaultCharset 공개적으로 정적으로 프로퍼티

The default charset to use when parsing text parts with no charset information.
public static string $defaultCharset
리턴 string

$encodingTypes 공개적으로 정적으로 프로퍼티

사용 중단:
public static $encodingTypes

$memoryLimit 공개적으로 정적으로 프로퍼티

The memory limit for use with the PHP temp stream.
public static int $memoryLimit
리턴 integer

$mimeTypes 공개적으로 정적으로 프로퍼티

사용 중단:
public static $mimeTypes

$parent 공개적으로 프로퍼티

Parent object. Value only accurate when iterating.
부터: 2.8.0
public Horde_Mime_Part $parent
리턴 Horde_Mime_Part