Class Horde_Core_Factory_MimeViewer
A Horde_Injector:: based Horde_Mime_Viewer factory.
Copyright 2010-2012 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.
-
Horde_Core_Factory_Base
-
Horde_Core_Factory_MimeViewer
Methods summary
public
Horde_Mime_Viewer_Base
|
#
create( Horde_Mime_Part $mime, array $opts = array() )
Attempts to return a concrete Horde_Mime_Viewer object based on the
MIME type.
Attempts to return a concrete Horde_Mime_Viewer object based on the
MIME type.
Parameters
- $mime
- An object with the data to be rendered.
- $opts
- Additional options:
<pre><span class="php-quote">'app'</span> - (string) The Horde application to search <span class="php-keyword1">for</span> drivers in.
<span class="php-keyword1">DEFAULT</span>: <span class="php-keyword2">current</span> app
<span class="php-quote">'type'</span> - (string) The MIME type to <span class="php-keyword1">use</span> <span class="php-keyword1">for</span> loading.
<span class="php-keyword1">DEFAULT</span>: Uses MIME type in <span class="php-var">$mime</span>.</pre>
Returns
Horde_Mime_Viewer_Base The newly created instance.
Throws
Horde_Mime_Viewer_Exception
|
public
array
|
#
getViewerConfig( string $type, string $app )
Gets the configuration for a MIME type.
Gets the configuration for a MIME type.
Parameters
- $type
- The MIME type.
- $app
- The current Horde application.
Returns
array The driver and a list of configuration parameters.
|
public
Horde_Mime_Viewer_Base
|
#
getViewerCallback( Horde_Mime_Viewer_Base $viewer, Horde_Mime_Part $mime, string $type )
Callback used to return a MIME Viewer object from within certain
Viewer drivers.
Callback used to return a MIME Viewer object from within certain
Viewer drivers.
Parameters
- $viewer
- <p>The MIME Viewer driver
requesting the new object.</p>
- $mime
- <p>An object with the data to be
rendered.</p>
- $type
- <p>The MIME type to use for
rendering.</p>
Returns
Horde_Mime_Viewer_Base The newly created instance.
Throws
Horde_Mime_Viewer_Exception
|
public
Horde_Themes_Image
|
#
getIcon( Horde_Mime_Part|string $mime, array $opts = array() )
Return the appropriate icon for a MIME object/MIME type.
Return the appropriate icon for a MIME object/MIME type.
Parameters
- $mime
- The MIME object or type to query.
- $opts
- Additional options:
<pre><span class="php-quote">'app'</span> - (string) The Horde application to search <span class="php-keyword1">for</span> drivers in.
<span class="php-keyword1">DEFAULT</span>: <span class="php-keyword2">current</span> app</pre>
Returns
|