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 2014-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 2014-2017 Horde LLC
  10   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  11   * @package   Imap_Client
  12   */
  13  
  14  /**
  15   * Query the search charsets available on a server that supports the UTF-8
  16   * IMAP extension (RFC 6855).
  17   *
  18   * @author    Michael Slusarz <slusarz@horde.org>
  19   * @category  Horde
  20   * @copyright 2014-2017 Horde LLC
  21   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  22   * @package   Imap_Client
  23   * @since     2.24.0
  24   */
  25  class Horde_Imap_Client_Data_SearchCharset_Utf8
  26  extends Horde_Imap_Client_Data_SearchCharset
  27  {
  28      /**
  29       * Charset data.
  30       *
  31       * @var array
  32       */
  33      protected $_charsets = array(
  34          'US-ASCII' => true,
  35          'UTF-8' => true
  36      );
  37  
  38      /**
  39       */
  40      public function query($charset, $cached = false)
  41      {
  42          return isset($this->_charsets[Horde_String::upper($charset)]);
  43      }
  44  
  45      /**
  46       */
  47      public function setValid($charset, $valid = true)
  48      {
  49      }
  50  
  51      /* Serializable methods. */
  52  
  53      /**
  54       */
  55      public function serialize()
  56      {
  57          return '';
  58      }
  59  
  60      /**
  61       */
  62      public function unserialize($data)
  63      {
  64      }
  65  
  66  }