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.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

   1  <?php
   2  /**
   3   * Copyright 2010-2017 Horde LLC (http://www.horde.org/)
   4   *
   5   * See the enclosed file LICENSE for license information (LGPL). If you
   6   * did not receive this file, see http://www.horde.org/licenses/lgpl21.
   7   *
   8   * @author   
   9   * @category Horde
  10   * @license  http://www.horde.org/licenses/lgpl21 LGPL
  11   * @package  Exception
  12   */
  13  
  14  /**
  15   * Exception thrown if any access without sufficient permissions occured.
  16   *
  17   * @author    
  18   * @category  Horde
  19   * @copyright 2010-2017 Horde LLC
  20   * @license   http://www.horde.org/licenses/lgpl21 LGPL
  21   * @package   Exception
  22   */
  23  class Horde_Exception_PermissionDenied extends Horde_Exception
  24  {
  25      /**
  26       * Constructor.
  27       *
  28       * @see Horde_Exception::__construct()
  29       *
  30       * @param mixed $message           The exception message, a PEAR_Error
  31       *                                 object, or an Exception object.
  32       * @param integer $code            A numeric error code.
  33       */
  34      public function __construct($message = null, $code = null)
  35      {
  36          if (is_null($message)) {
  37              $message = Horde_Exception_Translation::t("Permission Denied");
  38          }
  39          parent::__construct($message, $code);
  40      }
  41  }