Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  /**
   3   * Copyright 2012-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   * @category  Horde
   9   * @copyright 2012-2017 Horde LLC
  10   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  11   * @package   Imap_Client
  12   */
  13  
  14  /**
  15   * Exception thrown for non-supported server extensions.
  16   *
  17   * @author    Michael Slusarz <slusarz@horde.org>
  18   * @category  Horde
  19   * @copyright 2012-2017 Horde LLC
  20   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  21   * @package   Imap_Client
  22   */
  23  class Horde_Imap_Client_Exception_NoSupportExtension
  24  extends Horde_Imap_Client_Exception
  25  {
  26      /**
  27       * The extension not supported on the server.
  28       *
  29       * @var string
  30       */
  31      public $extension;
  32  
  33      /**
  34       * Constructor.
  35       *
  36       * @param string $extension  The extension not supported on the server.
  37       * @param string $msg        A non-standard error message to use instead
  38       *                           of the default.
  39       */
  40      public function __construct($extension, $msg = null)
  41      {
  42          $this->extension = $extension;
  43  
  44          if (is_null($msg)) {
  45              $msg = sprintf(
  46                  Horde_Imap_Client_Translation::r("The server does not support the %s extension."),
  47                  $extension
  48              );
  49          }
  50  
  51          parent::__construct($msg, self::NOT_SUPPORTED);
  52      }
  53  
  54  }