Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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   * 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   * Unknown filter exception.
  14   */
  15  class Mustache_Exception_UnknownFilterException extends UnexpectedValueException implements Mustache_Exception
  16  {
  17      protected $filterName;
  18  
  19      /**
  20       * @param string    $filterName
  21       * @param Exception $previous
  22       */
  23      public function __construct($filterName, Exception $previous = null)
  24      {
  25          $this->filterName = $filterName;
  26          $message = sprintf('Unknown filter: %s', $filterName);
  27          if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
  28              parent::__construct($message, 0, $previous);
  29          } else {
  30              parent::__construct($message); // @codeCoverageIgnore
  31          }
  32      }
  33  
  34      public function getFilterName()
  35      {
  36          return $this->filterName;
  37      }
  38  }