1: <?php
2: /**
3: * Copyright 2010-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 2010-2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Data structure for storing the virtual inbox.
16: *
17: * @author Michael Slusarz <slusarz@horde.org>
18: * @category Horde
19: * @copyright 2010-2014 Horde LLC
20: * @license http://www.horde.org/licenses/gpl GPL
21: * @package IMP
22: */
23: class IMP_Search_Vfolder_Vinbox extends IMP_Search_Vfolder_Builtin
24: {
25: /**
26: * Initialization tasks.
27: */
28: protected function _init()
29: {
30: $this->_id = 'vinbox';
31: $this->_label = _("Virtual Inbox");
32:
33: $this->add(new IMP_Search_Element_Flag(
34: Horde_Imap_Client::FLAG_SEEN,
35: false
36: ));
37: $this->add(new IMP_Search_Element_Flag(
38: Horde_Imap_Client::FLAG_DELETED,
39: false
40: ));
41: }
42:
43: /**
44: * Get object properties.
45: * Only create mailbox list on demand.
46: *
47: * @see __get()
48: */
49: public function __get($name)
50: {
51: switch ($name) {
52: case 'mboxes':
53: $poll = $GLOBALS['injector']->getInstance('IMP_Ftree')->poll;
54: $poll->prunePollList();
55: return $poll->getPollList(true);
56: }
57:
58: return parent::__get($name);
59: }
60:
61: }
62: