[ Index ]
 

Code source de IMP H3 (4.1.5)

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/lib/MIME/Viewer/ -> rfc822.php (source)

   1  <?php
   2  
   3  require_once 'Horde/MIME/Viewer/rfc822.php';
   4  
   5  /**
   6   * The IMP_MIME_Viewer_rfc822 class renders out messages from
   7   * message/rfc822 content types.
   8   *
   9   * $Horde: imp/lib/MIME/Viewer/rfc822.php,v 1.26.10.11 2007/01/02 13:55:00 jan Exp $
  10   *
  11   * Copyright 2002-2007 Michael Slusarz <slusarz@bigworm.colorado.edu>
  12   *
  13   * See the enclosed file COPYING for license information (GPL). If you
  14   * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
  15   *
  16   * @author  Michael Slusarz <slusarz@bigworm.colorado.edu>
  17   * @since   IMP 4.0
  18   * @package Horde_MIME_Viewer
  19   */
  20  class IMP_MIME_Viewer_rfc822 extends MIME_Viewer_rfc822 {
  21  
  22      /**
  23       * Render out the currently set contents.
  24       *
  25       * @param array $params  An array with a reference to a MIME_Contents
  26       *                       object.
  27       *
  28       * @return string  The rendered text in HTML.
  29       */
  30      function render($params)
  31      {
  32          $contents = &$params[0];
  33  
  34          /* Get the entire body part of the message/rfc822 contents. */
  35          if (is_a($contents, 'IMP_Contents') &&
  36              $this->mime_part->getMIMEId()) {
  37              $this->mime_part = &$contents->getDecodedMIMEPart($this->mime_part->getMIMEId(), true);
  38          }
  39  
  40          return parent::render();
  41      }
  42  
  43      /**
  44       * Render out attachment information.
  45       *
  46       * @param array $params  An array with a reference to a MIME_Contents
  47       *                       object.
  48       *
  49       * @return string  The rendered text in HTML.
  50       */
  51      function renderAttachmentInfo($params)
  52      {
  53          $contents = &$params[0];
  54  
  55          if (is_a($contents, 'IMP_Contents') &&
  56              !$this->mime_part->getContents()) {
  57              $id = $this->mime_part->getMIMEId();
  58              $hdr_id = substr($id, -2);
  59              if ($hdr_id != '.0') {
  60                  $id .= '.0';
  61              }
  62              $this->mime_part = &$contents->getDecodedMIMEPart($id);
  63          }
  64  
  65          return parent::renderAttachmentInfo();
  66      }
  67  
  68  }


Généré le : Thu Nov 29 12:30:07 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics