Skip to content

Commit

Permalink
Add 'url' property
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 21, 2014
1 parent 61ee8f1 commit e0dbd33
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions imp/lib/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* a user can create.
* @property-read string $server_key Server key used to login.
* @property-read string $thread_algo The threading algorithm to use.
* @property-read Horde_Imap_Client_Url $url A URL object.
*/
class IMP_Imap implements Serializable
{
Expand Down Expand Up @@ -165,6 +166,15 @@ public function __get($key)
$this->_changed = true;

return $thread;

case 'url':
$url = new Horde_Imap_Client_Url();
if ($this->init) {
$url->hostspec = $this->getParam('hostspec');
$url->port = $this->getParam('port');
$url->protocol = $this->isImap() ? 'imap' : 'pop';
}
return $url;
}
}

Expand Down

0 comments on commit e0dbd33

Please sign in to comment.