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 syntax exception.
  14   */
  15  class Mustache_Exception_SyntaxException extends LogicException implements Mustache_Exception
  16  {
  17      protected $token;
  18  
  19      /**
  20       * @param string    $msg
  21       * @param array     $token
  22       * @param Exception $previous
  23       */
  24      public function __construct($msg, array $token, Exception $previous = null)
  25      {
  26          $this->token = $token;
  27          if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
  28              parent::__construct($msg, 0, $previous);
  29          } else {
  30              parent::__construct($msg); // @codeCoverageIgnore
  31          }
  32      }
  33  
  34      /**
  35       * @return array
  36       */
  37      public function getToken()
  38      {
  39          return $this->token;
  40      }
  41  }