1: <?php
2: /**
3: * This class provides a data structure for storing the virtual inbox.
4: *
5: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (GPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/gpl.
9: *
10: * @author Michael Slusarz <slusarz@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/gpl GPL
13: * @package IMP
14: */
15: class IMP_Search_Vfolder_Vinbox extends IMP_Search_Vfolder_Builtin
16: {
17: /**
18: * Initialization tasks.
19: */
20: protected function _init()
21: {
22: $this->_id = 'vinbox';
23: $this->_label = _("Virtual Inbox");
24:
25: $this->add(new IMP_Search_Element_Flag(
26: Horde_Imap_Client::FLAG_SEEN,
27: false
28: ));
29: $this->add(new IMP_Search_Element_Flag(
30: Horde_Imap_Client::FLAG_DELETED,
31: false
32: ));
33: }
34:
35: /**
36: * Get object properties.
37: * Only create mailbox list on demand.
38: *
39: * @see __get()
40: */
41: public function __get($name)
42: {
43: switch ($name) {
44: case 'mboxes':
45: $imp_tree = $GLOBALS['injector']->getInstance('IMP_Imap_Tree');
46: $imp_tree->prunePollList();
47: return $imp_tree->getPollList(true);
48: }
49:
50: return parent::__get($name);
51: }
52:
53: }
54: