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.
/** * Constructor. * * @param Horde_Mime_Part $mime_part The object with the data to be * rendered. * @param array $conf Configuration. */ public function __construct(Horde_Mime_Part $part, array $conf = array()) { parent::__construct($part, $conf); /* TODO: Are there other image types that are compressed? */ $this->_metadata['compressed'] = in_array($this->_getType(), array('image/gif', 'image/jpeg', 'image/png')); }
/** * Callback used to return a MIME Viewer object from within certain * Viewer drivers. * * @param Horde_Mime_Viewer_Base $viewer The MIME Viewer driver * requesting the new object. * @param Horde_Mime_Part $mime An object with the data to be * rendered. * @param string $type The MIME type to use for * rendering. * * @return Horde_Mime_Viewer_Base The newly created instance. * @throws Horde_Mime_Viewer_Exception */ public function createCallback(Horde_Mime_Viewer_Base $viewer, Horde_Mime_Part $mime, $type) { return $this->create($mime, array('contents' => $viewer->getConfigParam('imp_contents'), 'type' => $type)); }
/** * Constructor. * * @param Horde_Mime_Part $mime_part The object with the data to be * rendered. * @param array $conf Configuration: * <pre> * 'monospace' - (string) A class to use to display monospace text inline. * DEFAULT: Uses style="font-family:monospace" * 'rar' - (Horde_Compress_Rar) A zip object. * </pre> */ public function __construct(Horde_Mime_Part $part, array $conf = array()) { parent::__construct($part, $conf); }
/** * Constructor. * * @param Horde_Mime_Part $mime_part The object with the data to be * rendered. * @param array $conf Configuration: * <pre> * 'location' - (string) Location of the unrtf binary. * </pre> * * @throws InvalidArgumentException */ public function __construct(Horde_Mime_Part $part, array $conf = array()) { $this->_required = array_merge($this->_required, array('location')); parent::__construct($part, $conf); }
/** * Constructor. * * @param Horde_Mime_Part $part The object with the data to be rendered. * @param array $conf Configuration: * - browser: (Horde_Browser) Browser object. * - notification: (Horde_Notification_Base) Notification object. * - prefs: (Horde_Prefs) Prefs object. * - registry: (Horde_Registry) Registry object. * * @throws InvalidArgumentException */ public function __construct(Horde_Mime_Part $part, array $conf = array()) { $this->_required = array_merge($this->_required, array('browser', 'notification', 'prefs', 'registry')); parent::__construct($part, $conf); }
/** */ public function canRender($mode) { return $mode == 'inline' && !$this->_init(true) ? false : parent::canRender($mode); }
/** * Can this driver render the data? * * @param string $mode See parent::canRender(). * * @return boolean See parent::canRender(). */ public function canRender($mode) { switch ($mode) { case 'full': if ($this->_mimepart->getType() == 'application/pgp-keys') { return true; } break; case 'raw': if ($this->_mimepart->getType() == 'application/pgp-signature' && $this->_mimepart->getMetadata(Horde_Crypt_Pgp_Parse::SIG_RAW)) { return true; } break; } return parent::canRender($mode); }
/** * Constructor. * * @param Horde_Mime_Part $mime_part The object with the data to be * rendered. * @param array $conf Configuration: * <pre> * 'gzip' - (Horde_Compress_Gzip) A gzip object. * 'monospace' - (string) A class to use to display monospace text inline. * DEFAULT: Uses style="font-family:monospace" * 'tar' - (Horde_Compress_Tar) A tar object. * </pre> */ public function __construct(Horde_Mime_Part $part, array $conf = array()) { parent::__construct($part, $conf); $this->_metadata['compressed'] = in_array($part->getSubType(), $this->_gzipSubtypes); }