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  /*
   4   * This file is part of Mustache.php.
   5   *
   6   * (c) 2010-2017 Justin Hileman
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  /**
  13   * Mustache template Source interface.
  14   */
  15  interface Mustache_Source
  16  {
  17      /**
  18       * Get the Source key (used to generate the compiled class name).
  19       *
  20       * This must return a distinct key for each template source. For example, an
  21       * MD5 hash of the template contents would probably do the trick. The
  22       * ProductionFilesystemLoader uses mtime and file path. If your production
  23       * source directory is under version control, you could use the current Git
  24       * rev and the file path...
  25       *
  26       * @throws RuntimeException when a source file cannot be read
  27       *
  28       * @return string
  29       */
  30      public function getKey();
  31  
  32      /**
  33       * Get the template Source.
  34       *
  35       * @throws RuntimeException when a source file cannot be read
  36       *
  37       * @return string
  38       */
  39      public function getSource();
  40  }