1: <?php
2: /**
3: * Copyright 2013-2014 Horde LLC (http://www.horde.org/)
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @category Horde
9: * @copyright 2013-2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Provides common functions for interaction with IMAP/POP3 servers via the
16: * Horde_Imap_Client package (for remote servers).
17: *
18: * @author Michael Slusarz <slusarz@horde.org>
19: * @category Horde
20: * @copyright 2013-2014 Horde LLC
21: * @license http://www.horde.org/licenses/gpl GPL
22: * @package IMP
23: */
24: class IMP_Imap_Remote extends IMP_Imap
25: {
26: /**
27: */
28: public function __get($key)
29: {
30: switch ($key) {
31: case 'base_ob':
32: return $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create();
33:
34: case 'config':
35: return $this->base_ob->config;
36:
37: case 'server_key':
38: return $this->base_ob->server_key;
39:
40: case 'thread_algo':
41: $thread = $this->base_ob->thread;
42: $thread_cap = $this->queryCapability('THREAD');
43: return in_array($thread, is_array($thread_cap) ? $thread_cap : array())
44: ? $thread
45: : 'ORDEREDSUBJECT';
46: }
47:
48: return parent::__get($key);
49: }
50:
51: /**
52: */
53: public function createBaseImapObject($username, $password, $skey)
54: {
55: return $this->base_ob;
56: }
57:
58: /**
59: */
60: public function doPostLoginTasks()
61: {
62: }
63:
64: /**
65: * Update the list of mailboxes to ignore when caching FETCH data in the
66: * IMAP client object.
67: */
68: public function updateFetchIgnore()
69: {
70: }
71:
72: }
73: