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: * Base definition for built-in Virtual Folders.
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: abstract class IMP_Search_Vfolder_Builtin extends IMP_Search_Vfolder
24: {
25: /**
26: * Can this query be edited?
27: *
28: * @var boolean
29: */
30: protected $_canEdit = false;
31:
32: /**
33: * List of serialize entries not to save.
34: *
35: * @var array
36: */
37: protected $_nosave = array('c', 'i', 'l', 'm');
38:
39: /**
40: * Constructor.
41: *
42: * The 'add', 'id', 'label', and 'mboxes' parameters are not honored.
43: *
44: * @see __construct()
45: */
46: public function __construct(array $opts = array())
47: {
48: $this->enabled = empty($opts['disable']);
49:
50: $this->_init();
51: }
52:
53: /**
54: * Initialization tasks.
55: */
56: abstract protected function _init();
57:
58: /**
59: * Unserialization.
60: *
61: * @param string $data Serialized data.
62: *
63: * @throws Exception
64: */
65: public function unserialize($data)
66: {
67: parent::unserialize($data);
68: $this->_init();
69: }
70:
71: }
72: