Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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.

Differences Between: [Versions 310 and 401] [Versions 310 and 402] [Versions 310 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  }