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