[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Copyright 2011-2014 Horde LLC (http://www.horde.org/) 4 * 5 * See the enclosed file COPYING 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 2011-2014 Horde LLC 10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 11 * @package Imap_Client 12 */ 13 14 /** 15 * Wrapper around Ids object that correctly handles POP3 UID strings. 16 * 17 * @author Michael Slusarz <slusarz@horde.org> 18 * @category Horde 19 * @copyright 2011-2014 Horde LLC 20 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 21 * @package Imap_Client 22 */ 23 class Horde_Imap_Client_Ids_Pop3 extends Horde_Imap_Client_Ids 24 { 25 /** 26 * Create a POP3 message sequence string. 27 * 28 * Index Format: UID1[SPACE]UID2... 29 * 30 * @param boolean $sort Not used in this class. 31 * 32 * @return string The POP3 message sequence string. 33 */ 34 protected function _toSequenceString($sort = true) 35 { 36 /* Use space as delimiter as it is the only printable ASCII character 37 * that is not allowed as part of the UID (RFC 1939 [7]). */ 38 return implode(' ', count($this->_ids) > 25000 ? array_unique($this->_ids) : array_keys(array_flip($this->_ids))); 39 } 40 41 /** 42 * Parse a POP3 message sequence string into a list of indices. 43 * 44 * @param string $str The POP3 message sequence string. 45 * 46 * @return array An array of UIDs. 47 */ 48 protected function _fromSequenceString($str) 49 { 50 return explode(' ', trim($str)); 51 } 52 53 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |