Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
   1  <?php
   2  
   3  /**

   4   * Abstract base node class that all others inherit from.

   5   *

   6   * Why do we not use the DOM extension?  (1) It is not always available,

   7   * (2) it has funny constraints on the data it can represent,

   8   * whereas we want a maximally flexible representation, and (3) its

   9   * interface is a bit cumbersome.

  10   */
  11  abstract class HTMLPurifier_Node
  12  {
  13      /**

  14       * Line number of the start token in the source document

  15       * @type int

  16       */
  17      public $line;
  18  
  19      /**

  20       * Column number of the start token in the source document. Null if unknown.

  21       * @type int

  22       */
  23      public $col;
  24  
  25      /**

  26       * Lookup array of processing that this token is exempt from.

  27       * Currently, valid values are "ValidateAttributes".

  28       * @type array

  29       */
  30      public $armor = array();
  31  
  32      /**

  33       * When true, this node should be ignored as non-existent.

  34       *

  35       * Who is responsible for ignoring dead nodes?  FixNesting is

  36       * responsible for removing them before passing on to child

  37       * validators.

  38       */
  39      public $dead = false;
  40  
  41      /**

  42       * Returns a pair of start and end tokens, where the end token

  43       * is null if it is not necessary. Does not include children.

  44       * @type array

  45       */
  46      abstract public function toTokenPair();
  47  }
  48  
  49  // vim: et sw=4 sts=4