Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
   1  <?php
   2  
   3  /**

   4   * Represents a document type, contains information on which modules

   5   * need to be loaded.

   6   * @note This class is inspected by Printer_HTMLDefinition->renderDoctype.

   7   *       If structure changes, please update that function.

   8   */
   9  class HTMLPurifier_Doctype
  10  {
  11      /**

  12       * Full name of doctype

  13       * @type string

  14       */
  15      public $name;
  16  
  17      /**

  18       * List of standard modules (string identifiers or literal objects)

  19       * that this doctype uses

  20       * @type array

  21       */
  22      public $modules = array();
  23  
  24      /**

  25       * List of modules to use for tidying up code

  26       * @type array

  27       */
  28      public $tidyModules = array();
  29  
  30      /**

  31       * Is the language derived from XML (i.e. XHTML)?

  32       * @type bool

  33       */
  34      public $xml = true;
  35  
  36      /**

  37       * List of aliases for this doctype

  38       * @type array

  39       */
  40      public $aliases = array();
  41  
  42      /**

  43       * Public DTD identifier

  44       * @type string

  45       */
  46      public $dtdPublic;
  47  
  48      /**

  49       * System DTD identifier

  50       * @type string

  51       */
  52      public $dtdSystem;
  53  
  54      public function __construct(
  55          $name = null,
  56          $xml = true,
  57          $modules = array(),
  58          $tidyModules = array(),
  59          $aliases = array(),
  60          $dtd_public = null,
  61          $dtd_system = null
  62      ) {
  63          $this->name         = $name;
  64          $this->xml          = $xml;
  65          $this->modules      = $modules;
  66          $this->tidyModules  = $tidyModules;
  67          $this->aliases      = $aliases;
  68          $this->dtdPublic    = $dtd_public;
  69          $this->dtdSystem    = $dtd_system;
  70      }
  71  }
  72  
  73  // vim: et sw=4 sts=4