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   * 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  }