Skip to content

Commit

Permalink
[mms] Added the 'url' property to Horde_Imap_Client_Base.
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Aug 4, 2014
1 parent e1b3cf3 commit b4ec077
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion framework/Imap_Client/doc/Horde/Imap/Client/UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Upgrading to 2.24.0

- Horde_Imap_Client_Base

Added the $capability and $search_charset properties.
Added the $capability, $search_charset, and $url properties.

- capability()
- queryCapability()
Expand Down
9 changes: 9 additions & 0 deletions framework/Imap_Client/lib/Horde/Imap/Client/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* A capability object. (@since 2.24.0)
* @property-read Horde_Imap_Client_Data_SearchCharset $search_charset
* A search charset object. (@since 2.24.0)
* @property-read Horde_Imap_Client_Url $url The URL object for the current
* connection parameters (@since 2.24.0)
*/
abstract class Horde_Imap_Client_Base
implements Serializable, SplObserver
Expand Down Expand Up @@ -370,6 +372,13 @@ public function __get($name)
}
$this->_init['search_charset']->setBaseOb($this);
return $this->_init['search_charset'];

case 'url':
$url = new Horde_Imap_Client_Url();
$url->hostspec = $this->getParam('hostspec');
$url->port = $this->getParam('port');
$url->protocol = 'imap';
return $url;
}
}

Expand Down
15 changes: 15 additions & 0 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ class Horde_Imap_Client_Socket_Pop3 extends Horde_Imap_Client_Base
*/
protected $_fetchDataClass = 'Horde_Imap_Client_Data_Fetch_Pop3';

/**
*/
public function __get($name)
{
$out = parent::__get($name);

switch ($name) {
case 'url':
$url->protocol = 'pop3';
break;
}

return $out;
}

/**
*/
protected function _initCache($current = false)
Expand Down
2 changes: 2 additions & 0 deletions framework/Imap_Client/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Added the &apos;url&apos; property to Horde_Imap_Client_Base.
* [mms] Fix thread sort order when using the client-side ordered subject algorithm and there are messages with identical dates.
* [mms] Allow multiple live IMAP/POP3 tests to be run in a single PHPUnit instance.
* [mms] Add support for the IMAP UTF-8 extension (RFC 6855).
Expand Down Expand Up @@ -2555,6 +2556,7 @@
<date>2014-07-31</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Added the &apos;url&apos; property to Horde_Imap_Client_Base.
* [mms] Fix thread sort order when using the client-side ordered subject algorithm and there are messages with identical dates.
* [mms] Allow multiple live IMAP/POP3 tests to be run in a single PHPUnit instance.
* [mms] Add support for the IMAP UTF-8 extension (RFC 6855).
Expand Down

0 comments on commit b4ec077

Please sign in to comment.