Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   1  <?php
   2  /**
   3   * Copyright 2015-2017 Horde LLC (http://www.horde.org/)
   4   *
   5   * See the enclosed file LICENSE for license information (LGPL). If you
   6   * did not receive this file, see http://www.horde.org/licenses/lgpl21.
   7   *
   8   * @category  Horde
   9   * @copyright 2015-2017 Horde LLC
  10   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  11   * @package   Mime
  12   */
  13  
  14  /**
  15   * This class represents the Content-Description header value (RFC 2045[8]).
  16   *
  17   * @author    Michael Slusarz <slusarz@horde.org>
  18   * @category  Horde
  19   * @copyright 2015-2017 Horde LLC
  20   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  21   * @package   Mime
  22   * @since     2.7.0
  23   */
  24  class Horde_Mime_Headers_ContentDescription
  25  extends Horde_Mime_Headers_Element_Single
  26  implements Horde_Mime_Headers_Extension_Mime
  27  {
  28      /**
  29       */
  30      public function __construct($name, $value)
  31      {
  32          parent::__construct('Content-Description', $value);
  33      }
  34  
  35      /**
  36       */
  37      protected function _sendEncode($opts)
  38      {
  39          return array(Horde_Mime::encode($this->value, $opts['charset']));
  40      }
  41  
  42      /**
  43       */
  44      public static function getHandles()
  45      {
  46          return array(
  47              // MIME: RFC 2045
  48              'content-description'
  49          );
  50      }
  51  
  52  }