1: <?php
2: /**
3: * Copyright 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 2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Metadata information for attachments.
16: *
17: * @author Michael Slusarz <slusarz@horde.org>
18: * @category Horde
19: * @copyright 2014 Horde LLC
20: * @license http://www.horde.org/licenses/gpl
21: * @package IMP
22: *
23: * @property array $data Raw data.
24: */
25: class IMP_Compose_Attachment_Metadata
26: {
27: /**
28: * Metadata.
29: *
30: * @var array
31: */
32: protected $_data = array();
33:
34: /**
35: */
36: public function __get($name)
37: {
38: switch ($name) {
39: case 'data':
40: return array_filter($this->_data);
41: }
42:
43: return null;
44: }
45:
46: /**
47: */
48: public function __set($name, $value)
49: {
50: switch ($name) {
51: case 'data':
52: $this->_data = $value;
53: break;
54: }
55: }
56:
57: }
58: