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 filters.
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_Filter_Builtin extends IMP_Search_Filter
24: {
25: /**
26: */
27: protected $_canEdit = false;
28:
29: /**
30: */
31: protected $_nosave = array('c', 'i', 'l');
32:
33: /**
34: * Constructor.
35: *
36: * The 'add', 'id', 'label', and 'mboxes' parameters are ignored.
37: */
38: public function __construct(array $opts = array())
39: {
40: $this->enabled = empty($opts['disable']);
41:
42: $this->_init();
43: }
44:
45: /**
46: */
47: abstract protected function _init();
48:
49: /**
50: */
51: public function unserialize($data)
52: {
53: parent::unserialize($data);
54: $this->_init();
55: }
56:
57: }
58: