Property | Type | Description | |
---|---|---|---|
$_build | boolean | Have we scanned for embedded parts? | |
$_embedded | array | The list of MIME IDs that consist of embedded data. | |
$_header | mixed | Message header. | |
$_indices | IMP_Indices_Mailbox | The index of the current message. | |
$_message | Horde_Mime_Part | The Horde_Mime_Part object for the message. | |
$_viewcache | object | Cached data for the MIME Viewer objects. |
Method | Description | |
---|---|---|
__construct ( mixed $in ) | Constructor. | |
__toString ( ) : string | String representation of object. | |
canDisplay ( mixed $part, integer $mask, string $type = null ) : integer | Can this MIME part be displayed in the given mode? | |
downloadAllList ( ) : array | Get download all list. | |
findBody ( string $subtype = null ) : string | Finds the main "body" text part (if any) in a message. | |
findMimeType ( string $id, string $type ) : mixed | Find a MIME type in parent parts. | |
fullMessageText ( array $options = [] ) : mixed | Returns the full message text. | |
getBody ( array $options = [] ) : mixed | Returns the entire body of the message. | |
getBodyPart ( integer $id, array $options = [] ) : object | Gets the raw text for one section of the message. | |
getHeader ( integer $type = self::HEADER_OB ) : mixed | Returns base header information. | |
getHeaderAndMarkAsSeen ( integer $type = self::HEADER_OB ) : mixed | Returns base header information and marks the message as seen. | |
getIndicesOb ( ) : IMP_Indices | Return an IMP_Indices object for the current message. | |
getListInformation ( ) : array | Returns mailing list information for the message. | |
getMIMEMessage ( ) : Horde_Mime_Part | Returns the Horde_Mime_Part object. | |
getMailbox ( ) : IMP_Mailbox | Returns the IMAP mailbox for the current message. | |
getMimePart ( integer $id, array $options = [] ) : Horde_Mime_Part | Fetch a part of a MIME message. | |
getPartName ( Horde_Mime_Part $part, boolean $use_descrip = false ) : string | Return the descriptive part label, making sure it is not empty. | |
getSummary ( string $id, integer $mask ) : array | Get summary info for a MIME ID. | |
getTree ( string $renderer = 'Horde_Core_Tree_Renderer_Html' ) : Horde_Tree_Renderer_Base | Returns the MIME part tree of the message. | |
getUid ( ) : integer | Returns the IMAP UID for the current message. | |
getViewCache ( ) : object | Return the view cache object for this message. | |
isEmbedded ( string $mime_id ) : boolean | Determines if a given MIME part ID is a part of embedded data. | |
linkView ( Horde_Mime_Part $mime_part, integer $actionID, string $text, array $options = [] ) : string | Generate a link to the download/view page. | |
linkViewJS ( Horde_Mime_Part $mime_part, string $actionID, string $text, array $options = [] ) : string | Generate a javascript link to the download/view page. | |
renderMIMEPart ( string $mime_id, integer $mode, array $options = [] ) : array | Render a MIME Part. | |
urlView ( Horde_Mime_Part $mime_part = null, integer $actionID = 'view_attach', array $options = [] ) : Horde_Url | Return the URL to the download/view page. |
Method | Description | |
---|---|---|
_addTreeNodes ( $tree, Horde_Mime_Part $part ) | Adds MIME parts to the tree instance. | |
_buildMessage ( array $parts = null ) | Builds the "virtual" Horde_Mime_Part object by checking for embedded parts. | |
_fetchData ( Horde_Imap_Client_Fetch_Query $query ) : Horde_Imap_Client_Data_Fetch | Get FETCH data from IMAP server for this message. | |
_getHeader ( integer $type, boolean $seen ) : mixed | Returns base header information. | |
_urlViewParams ( Horde_Mime_Part $mime_part, integer $actionID, array $params ) : array | Generates the necessary URL parameters for the download/view page. |
public __construct ( mixed $in ) | ||
$in | mixed | An IMP_Indices_Mailbox or Horde_Mime_Part object. |
public __toString ( ) : string | ||
return | string | The indices string. |
protected _addTreeNodes ( $tree, Horde_Mime_Part $part ) | ||
$part | Horde_Mime_Part | The MIME part to add. |
protected _buildMessage ( array $parts = null ) | ||
$parts | array | The parts list to process. |
protected _fetchData ( Horde_Imap_Client_Fetch_Query $query ) : Horde_Imap_Client_Data_Fetch | ||
$query | Horde_Imap_Client_Fetch_Query | Search query. |
return | Horde_Imap_Client_Data_Fetch | Fetch data for the message. |
public canDisplay ( mixed $part, integer $mask, string $type = null ) : integer | ||
$part | mixed | The MIME part or a MIME ID string. |
$mask | integer | One of the RENDER_ constants. |
$type | string | The type to use (overrides the MIME ID if $id is a MIME part). |
return | integer | The RENDER_ constant of the allowable display. |
public downloadAllList ( ) : array | ||
return | array | An array of downloadable parts. |
public fullMessageText ( array $options = [] ) : mixed | ||
$options | array | Additional options: - stream: (boolean) If true, return a stream for bodytext. DEFAULT: No |
return | mixed | The full message text or a stream resource if 'stream' is true. |
public getBodyPart ( integer $id, array $options = [] ) : object | ||
$id | integer | The ID of the MIME part. |
$options | array | Additional options: - decode: (boolean) Attempt to decode the bodypart on the remote server. DEFAULT: No - length: (integer) If set, only download this many bytes of the bodypart from the server. DEFAULT: All data is retrieved. - mimeheaders: (boolean) Include the MIME headers also? DEFAULT: No - stream: (boolean) If true, return a stream. DEFAULT: No |
return | object | Object with the following properties: - data: (mixed) The text of the part or a stream resource if 'stream' option is true. - decode: (string) If 'decode' option is true, and bodypart decoded on server, the content-type of the decoded data. |
public getHeaderAndMarkAsSeen ( integer $type = self::HEADER_OB ) : mixed | ||
$type | integer | See getHeader(). |
return | mixed | See getHeader(). |
public getIndicesOb ( ) : IMP_Indices | ||
return | IMP_Indices | An indices object. |
public getListInformation ( ) : array | ||
return | array | An array with 2 elements:
- exists: (boolean) True if this is a mailing list message. - reply_list: (string) If non-null, the e-mail address to use to post to the list. |
public getMIMEMessage ( ) : Horde_Mime_Part | ||
return | Horde_Mime_Part | A Horde_Mime_Part object. |
public getMailbox ( ) : IMP_Mailbox | ||
return | IMP_Mailbox | The message mailbox. |
public getMimePart ( integer $id, array $options = [] ) : Horde_Mime_Part | ||
$id | integer | The MIME index of the part requested. |
$options | array | Additional options: - length: (integer) If set, only download this many bytes of the bodypart from the server. DEFAULT: All data is retrieved. - nocontents: (boolean) If true, don't add the contents to the part DEFAULT: Contents are added to the part |
return | Horde_Mime_Part | The raw MIME part asked for. If not found, returns null. |
public getPartName ( Horde_Mime_Part $part, boolean $use_descrip = false ) : string | ||
$part | Horde_Mime_Part | The MIME Part object. |
$use_descrip | boolean | Use description? If false, uses name. |
return | string | The part label (non-empty). |
public getSummary ( string $id, integer $mask ) : array | ||
$id | string | The MIME ID. |
$mask | integer | A bitmask indicating what information to return:
Always output: 'type' = MIME type IMP_Contents::SUMMARY_BYTES Output: parts = 'bytes' IMP_Contents::SUMMARY_SIZE Output: parts = 'size' IMP_Contents::SUMMARY_ICON IMP_Contents::SUMMARY_ICON_RAW Output: parts = 'icon' IMP_Contents::SUMMARY_DESCRIP Output: parts = 'description_raw' IMP_Contents::SUMMARY_DESCRIP_LINK Output: parts = 'description' IMP_Contents::SUMMARY_DOWNLOAD Output: parts = 'download', 'download_url' IMP_Contents::SUMMARY_IMAGE_SAVE Output: parts = 'img_save' IMP_Contents::SUMMARY_PRINT IMP_Contents::SUMMARY_PRINT_STUB Output: parts = 'print' IMP_Contents::SUMMARY_STRIP Output: parts = 'strip' |
return | array | An array with the requested information. |
public getViewCache ( ) : object | ||
return | object | View object. |
public isEmbedded ( string $mime_id ) : boolean | ||
$mime_id | string | The MIME ID. |
return | boolean | True if the MIME ID is part of embedded data. |
public linkView ( Horde_Mime_Part $mime_part, integer $actionID, string $text, array $options = [] ) : string | ||
$mime_part | Horde_Mime_Part | The MIME part to view. |
$actionID | integer | The actionID value. |
$text | string | The ESCAPED (!) link text. |
$options | array | Additional parameters:
- attr: (array) Additional attributed to set on the link. - class: (string) The CSS class to use. - jstext: (string) The JS text to use. - params: (array) A list of any additional parameters that need to be passed to the download/view page. |
return | string | A HTML href link to the download/view page. |
public linkViewJS ( Horde_Mime_Part $mime_part, string $actionID, string $text, array $options = [] ) : string | ||
$mime_part | Horde_Mime_Part | The MIME part to view. |
$actionID | string | The actionID to perform. |
$text | string | The ESCAPED (!) link text. |
$options | array | Additional options: - css: (string) The CSS class to use. - jstext: (string) The javascript link text. - onload: (string) A JS function to run when popup window is fully loaded. - params: (array) A list of any additional parameters that need to be passed to download/view page. (key = name) - widget: (boolean) If true use Horde::widget() to generate, Horde::link() otherwise. |
return | string | A HTML href link to the download/view page. |
public renderMIMEPart ( string $mime_id, integer $mode, array $options = [] ) : array | ||
$mime_id | string | The MIME ID to render. |
$mode | integer | One of the RENDER_ constants. |
$options | array | Additional options: - autodetect: (boolean) Attempt to auto-detect MIME type? - mime_part: (Horde_Mime_Part) The MIME part to render. - type: (string) Use this MIME type instead of the MIME type identified in the MIME part. |
return | array | See Horde_Mime_Viewer_Base::render(). The following fields may also be present in addition to the fields defined in Horde_Mime_Viewer_Base: - attach: (boolean) Force display of this part as an attachment. - js: (array) A list of javascript commands to run after the content is displayed on screen. - name: (string) Contains the MIME name information. - wrap: (string) If present, indicates that this part, and all child parts, will be wrapped in a DIV with the given class name. |
public urlView ( Horde_Mime_Part $mime_part = null, integer $actionID = 'view_attach', array $options = [] ) : Horde_Url | ||
$mime_part | Horde_Mime_Part | The MIME part to view. |
$actionID | integer | The actionID to perform. |
$options | array | Additional options: - params: (array) A list of any additional parameters that need to be passed to the download/view page (key => name). |
return | Horde_Url | The URL to the download/view page. |
protected bool $_build | ||
return | boolean |
protected array $_embedded | ||
return | array |
protected IMP_Indices_Mailbox $_indices | ||
return | IMP_Indices_Mailbox |
protected Horde_Mime_Part $_message | ||
return | Horde_Mime_Part |
protected object $_viewcache | ||
return | object |