PHP Класс Horde_Mime_Viewer_Base, horde

Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

Constructor.
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().

_getEmbeddedMimeParts() защищенный Метод

If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data.
protected _getEmbeddedMimeParts ( ) : mixed
Результат mixed A Horde_Mime_Part object representing the embedded data. Returns null if no embedded MIME part(s) exist.

_getTempFile() защищенный Метод

Returns a temporary file name.
protected _getTempFile ( ) : string
Результат string A temp filename.

_getViewer() защищенный Метод

Return the underlying MIME Viewer for this part.
protected _getViewer ( ) : mixed
Результат mixed A Horde_Mime_Viewer object, or false if not found.

_render() защищенный Метод

This MUST be text/html data.
protected _render ( ) : array
Результат array See render().

_renderFullReturn() защищенный Метод

Internal helper function to add base HTML tags to a render() return array that contains a single MIME part.
protected _renderFullReturn ( array $data ) : array
$data array See render().
Результат array See render().

_renderInfo() защищенный Метод

Return the rendered information about the Horde_Mime_Part object.
protected _renderInfo ( ) : array
Результат array See render().

_renderInline() защищенный Метод

This MUST be text/html data. This is not a full HTML document - only the HTML necessary to output the part.
protected _renderInline ( ) : array
Результат array See render().

_renderRaw() защищенный Метод

Return the raw representation of the Horde_Mime_Part object.
protected _renderRaw ( ) : array
Результат array See render().

_renderReturn() защищенный Метод

Internal helper function to create render data array for a MIME Part object that only has a single part.
protected _renderReturn ( string $data = null, string $type = null ) : array
$data string The rendered data.
$type string The rendered type.
Результат array See render().

_textFilter() защищенный Метод

Filter text.
protected _textFilter ( string $text, mixed $driver, array $params = [] ) : string
$text string TODO
$driver mixed TODO
$params array TODO
Результат string The filtered text.

canRender() публичный Метод

Can this driver render the the data?
public canRender ( string $mode ) : boolean
$mode string The mode. Either 'full', 'inline', 'info', or 'raw'.
Результат boolean True if the driver can render the data for the given view.

embeddedMimeParts() публичный Метод

Does this MIME part possibly contain embedded MIME parts?
public embeddedMimeParts ( ) : boolean
Результат boolean True if this driver supports parsing embedded MIME parts.

getConfigParam() публичный Метод

Return a configuration parameter for the current viewer.
public getConfigParam ( string $param ) : mixed
$param string The parameter name.
Результат mixed The value of the parameter; returns null if the parameter doesn't exist.

getDriver() публичный Метод

Returns the driver name for the current object.
public getDriver ( ) : string
Результат string The driver name.

getEmbeddedMimeParts() публичный Метод

If this MIME part can contain embedded MIME part(s), and those part(s) exist, return a representation of that data.
public getEmbeddedMimeParts ( ) : mixed
Результат mixed A Horde_Mime_Part object representing the embedded data. Returns null if no embedded MIME part(s) exist.

getMetadata() публичный Метод

Returns metadata information on the viewer/data.
public getMetadata ( string $data ) : mixed
$data string The metadata key.
Результат mixed The requested information, or null if the key doesn't exist.

render() публичный Метод

Return the rendered version of the Horde_Mime_Part object.
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.
Результат 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.

setConfigParam() публичный Метод

Sets a configuration parameter for the current viewer.
public setConfigParam ( string $param, mixed $value )
$param string The parameter name.
$value mixed The parameter value.

setMimePart() публичный Метод

Sets the Horde_Mime_Part object for the class.
public setMimePart ( Horde_Mime_Part $mime_part )
$mime_part Horde_Mime_Part The object with the data to be rendered.

Описание свойств

$_capability защищенное свойство

This driver's display capabilities.
protected array $_capability
Результат array

$_conf защищенное свойство

Viewer configuration.
protected array $_conf
Результат array

$_metadata защищенное свойство

Metadata for the current viewer/data.
protected array $_metadata
Результат array

$_mimepart защищенное свойство

The Horde_Mime_Part object to render.
protected Horde_Mime_Part $_mimepart
Результат Horde_Mime_Part

$_required защищенное свойство

Required configuration parameters.
protected array $_required
Результат array