adding index files in order to prevent directory listing.
[squirrelmail.git] / class / mime / MessageHeader.class.php
1 <?php
2
3 /**
4 * MessageHeader.class.php
5 *
6 * Copyright (c) 2003-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This file contains functions needed to handle headers in mime messages.
10 *
11 * @version $Id$
12 * @package squirrelmail
13 * @subpackage mime
14 * @since 1.3.2
15 */
16
17 /**
18 * Message header class
19 * Class contains all variables available in a bodystructure
20 * entity like described in rfc2060
21 * It was called msg_header in 1.3.0 and 1.3.1.
22 * @package squirrelmail
23 * @subpackage mime
24 * @since 1.3.2
25 * @todo document vars
26 */
27 class MessageHeader {
28 var $type0 = '',
29 $type1 = '',
30 $parameters = array(),
31 $id = 0,
32 $description = '',
33 $encoding='',
34 $size = 0,
35 $md5='',
36 $disposition = '',
37 $language='';
38
39 /**
40 * Sets header variable
41 * @param string $var
42 * @param mixed $value
43 */
44 function setVar($var, $value) {
45 $this->{$var} = $value;
46 }
47
48 /**
49 * Gets parameter value from $parameters array
50 * @param string $p
51 * @return mixed
52 */
53 function getParameter($p) {
54 $value = strtolower($p);
55 return (isset($this->parameters[$p]) ? $this->parameters[$p] : '');
56 }
57
58 /**
59 * Sets parameter value in $parameters array
60 * @param string $parameter
61 * @param mixed $value
62 */
63 function setParameter($parameter, $value) {
64 $this->parameters[strtolower($parameter)] = $value;
65 }
66 }
67
68 ?>