1: <?php
2: /**
3: * Ingo_Storage_Forward is the object used to hold mail forwarding rule
4: * information.
5: *
6: * See the enclosed file LICENSE for license information (ASL). If you
7: * did not receive this file, see http://www.horde.org/licenses/apache.
8: *
9: * @author Michael Slusarz <slusarz@horde.org>
10: * @package Ingo
11: */
12: class Ingo_Storage_Forward extends Ingo_Storage_Rule
13: {
14: /**
15: */
16: protected $_addr = array();
17:
18: /**
19: */
20: protected $_keep = true;
21:
22: /**
23: */
24: protected $_obtype = Ingo_Storage::ACTION_FORWARD;
25:
26: /**
27: */
28: public function setForwardAddresses($data, $sort = true)
29: {
30: $this->_addr = $this->_addressList($data, $sort);
31: }
32:
33: /**
34: */
35: public function setForwardKeep($data)
36: {
37: $this->_keep = $data;
38: }
39:
40: /**
41: */
42: public function getForwardAddresses()
43: {
44: if (is_array($this->_addr)) {
45: foreach ($this->_addr as $key => $val) {
46: if (empty($val)) {
47: unset($this->_addr[$key]);
48: }
49: }
50: }
51: return $this->_addr;
52: }
53:
54: /**
55: */
56: public function getForwardKeep()
57: {
58: return $this->_keep;
59: }
60:
61: }
62: