Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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   * An object representing an IMAP client command interaction (RFC 3501
  16   * [2.2.1]).
  17   *
  18   * @author     Michael Slusarz <slusarz@horde.org>
  19   * @category   Horde
  20   * @copyright  2012-2016 Horde LLC
  21   * @deprecated
  22   * @license    http://www.horde.org/licenses/lgpl21 LGPL 2.1
  23   * @package    Imap_Client
  24   */
  25  class Horde_Imap_Client_Interaction_Client extends Horde_Imap_Client_Data_Format_List
  26  {
  27      /**
  28       * The command tag.
  29       *
  30       * @var string
  31       */
  32      public $tag;
  33  
  34      /**
  35       * Constructor.
  36       *
  37       * @param string $tag  The tag to use. If not set, will be automatically
  38       *                     generated.
  39       */
  40      public function __construct($tag = null)
  41      {
  42          $this->tag = is_null($tag)
  43              ? substr(strval(new Horde_Support_Randomid()), 0, 10)
  44              : strval($tag);
  45  
  46          parent::__construct($this->tag);
  47      }
  48  
  49      /**
  50       * Get the command.
  51       *
  52       * @return string  The command.
  53       */
  54      public function getCommand()
  55      {
  56          return isset($this->_data[1])
  57              ? $this->_data[1]
  58              : null;
  59      }
  60  
  61  }