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.
   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   * Object representation of a a POP3 (RFC 2384) URL.
  16   *
  17   * POP3 URLs take one of the following forms:
  18   *   - pop://<user>;auth=<auth>@<host>:<port>
  19   *
  20   * @author    Michael Slusarz <slusarz@horde.org>
  21   * @category  Horde
  22   * @copyright 2014-2017 Horde LLC
  23   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  24   * @package   Imap_Client
  25   * @since     2.25.0
  26   */
  27  class Horde_Imap_Client_Url_Pop3 extends Horde_Imap_Client_Url_Base
  28  {
  29      /**
  30       */
  31      public function __get($name)
  32      {
  33          switch ($name) {
  34          case 'port':
  35              return parent::__get($name) ?: 110;
  36  
  37          default:
  38              return parent::__get($name);
  39          }
  40      }
  41  
  42      /**
  43       * Create a POP3 URL (RFC 2384).
  44       *
  45       * @return string  A URL string.
  46       */
  47      public function __toString()
  48      {
  49          $url = 'pop://' . parent::__toString();
  50  
  51          if (($port = $this->port) != 110) {
  52              $url .= ':' . $port;
  53          }
  54  
  55          return $url . '/';
  56      }
  57  
  58      /**
  59       */
  60      protected function _parseUrl(array $data)
  61      {
  62      }
  63  
  64  }