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])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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