Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 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      /**
  67       * @return array
  68       */
  69      public function __serialize()
  70      {
  71          return array();
  72      }
  73  
  74      public function __unserialize(array $data)
  75      {
  76      }
  77  
  78  }