Property | Type | Description | |
---|---|---|---|
$_capability | array | This driver's display capabilities. | |
$_conf | array | Viewer configuration. | |
$_metadata | array | Metadata for the current viewer/data. | |
$_mimepart | Horde_Mime_Part | The Horde_Mime_Part object to render. | |
$_required | array | Required configuration parameters. |
Method | Description | |
---|---|---|
__construct ( Horde_Mime_Part $part, array $conf = [] ) | Constructor. | |
canRender ( string $mode ) : boolean | Can this driver render the the data? | |
embeddedMimeParts ( ) : boolean | Does this MIME part possibly contain embedded MIME parts? | |
getConfigParam ( string $param ) : mixed | Return a configuration parameter for the current viewer. | |
getDriver ( ) : string | Returns the driver name for the current object. | |
getEmbeddedMimeParts ( ) : mixed | If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data. | |
getMetadata ( string $data ) : mixed | Returns metadata information on the viewer/data. | |
render ( string $mode ) : array | Return the rendered version of the Horde_Mime_Part object. | |
setConfigParam ( string $param, mixed $value ) | Sets a configuration parameter for the current viewer. | |
setMimePart ( Horde_Mime_Part $mime_part ) | Sets the Horde_Mime_Part object for the class. |
Method | Description | |
---|---|---|
_getEmbeddedMimeParts ( ) : mixed | If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data. | |
_getTempFile ( ) : string | Returns a temporary file name. | |
_getViewer ( ) : mixed | Return the underlying MIME Viewer for this part. | |
_render ( ) : array | Return the full HTML rendered version of the Horde_Mime_Part object. | |
_renderFullReturn ( array $data ) : array | Internal helper function to add base HTML tags to a render() return array that contains a single MIME part. | |
_renderInfo ( ) : array | Return the rendered information about the Horde_Mime_Part object. | |
_renderInline ( ) : array | Return the rendered inline version of the Horde_Mime_Part object. | |
_renderRaw ( ) : array | Return the raw representation of the Horde_Mime_Part object. | |
_renderReturn ( string $data = null, string $type = null ) : array | Internal helper function to create render data array for a MIME Part object that only has a single part. | |
_textFilter ( string $text, mixed $driver, array $params = [] ) : string | Filter text. |
public __construct ( Horde_Mime_Part $part, array $conf = [] ) | ||
$part | Horde_Mime_Part | |
$conf | array | Configuration:
temp_file - (callback) A callback function that returns a temporary filename. Is passed one parameter: a prefix string. DEFAULT: Uses Horde_Util::getTempFile(). text_filter - (callback) A callback function used to filter text. Is called the same as Horde_Text_Filter::filter(). DEFAULT: Uses Horde_Text_Filter::filter(). |
protected _getEmbeddedMimeParts ( ) : mixed | ||
return | mixed | A Horde_Mime_Part object representing the embedded data. Returns null if no embedded MIME part(s) exist. |
protected _getTempFile ( ) : string | ||
return | string | A temp filename. |
protected _getViewer ( ) : mixed | ||
return | mixed | A Horde_Mime_Viewer object, or false if not found. |
protected _renderFullReturn ( array $data ) : array | ||
$data | array | See render(). |
return | array | See render(). |
protected _renderInfo ( ) : array | ||
return | array | See render(). |
protected _renderInline ( ) : array | ||
return | array | See render(). |
protected _renderRaw ( ) : array | ||
return | array | See render(). |
public embeddedMimeParts ( ) : boolean | ||
return | boolean | True if this driver supports parsing embedded MIME parts. |
public getConfigParam ( string $param ) : mixed | ||
$param | string | The parameter name. |
return | mixed | The value of the parameter; returns null if the parameter doesn't exist. |
public getEmbeddedMimeParts ( ) : mixed | ||
return | mixed | A Horde_Mime_Part object representing the embedded data. Returns null if no embedded MIME part(s) exist. |
public getMetadata ( string $data ) : mixed | ||
$data | string | The metadata key. |
return | mixed | The requested information, or null if the key doesn't exist. |
public render ( string $mode ) : array | ||
$mode | string | The mode:
'full' - A full representation of the MIME part, for use in a view where the output to the browser can be set to the value returned in 'type'. This mode should only return a single MIME ID entry for viewing and should not return any status information. 'inline' - A representation of the MIME part that can be viewed inline on a text/html page that may contain other HTML elements. 'info' - A representation of the MIME part that can be viewed inline on an text/html page that may contain other HTML elements. This view is not a full view, but rather a condensed view of the contents of the MIME part. This view is intended to be displayed to the user with the intention that this MIME part's subparts may also independently be viewed inline. 'raw' - The raw data of the MIME part, generally useful for downloading a part. This view exists in case this raw data needs to be altered in any way. |
return | array | An array. The keys are the MIME parts that were handled
by the driver. The values are either null (which
indicates the driver is recommending that this
particular MIME ID should not be displayed) or an array
with the following keys:
'data' - (string) The rendered data. 'status' - (array) An array of status information to be displayed to the user. Consists of arrays with the following keys: 'class' - (string) The class to use for display. 'img' - (string) An image to display. 'text' - (array) The text to display. 'type' - (string) The MIME type of the rendered data. |
public setConfigParam ( string $param, mixed $value ) | ||
$param | string | The parameter name. |
$value | mixed | The parameter value. |
public setMimePart ( Horde_Mime_Part $mime_part ) | ||
$mime_part | Horde_Mime_Part | The object with the data to be rendered. |
protected array $_capability | ||
return | array |
protected array $_metadata | ||
return | array |
protected Horde_Mime_Part $_mimepart | ||
return | Horde_Mime_Part |
protected array $_required | ||
return | array |