86bbf70229267106e27345995759771d44863c50
[squirrelmail.git] / class / mime / Disposition.class.php
1 <?php
2
3 /**
4 * Disposition.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 content disposition headers
10 * in mime messages. See RFC 2183.
11 *
12 * @version $Id$
13 * @package squirrelmail
14 * @subpackage mime
15 * @since 1.3.2
16 */
17
18 /**
19 * Class that handles content disposition header
20 * @package squirrelmail
21 * @subpackage mime
22 * @since 1.3.0
23 * @todo FIXME: do we have to declare vars ($name and $properties)?
24 */
25 class Disposition {
26 /**
27 * Constructor function
28 * @param string $name
29 */
30 function Disposition($name) {
31 $this->name = $name;
32 $this->properties = array();
33 }
34
35 /**
36 * Returns value of content disposition property
37 * @param string $par content disposition property name
38 * @return string
39 * @since 1.3.1
40 */
41 function getProperty($par) {
42 $value = strtolower($par);
43 if (isset($this->properties[$par])) {
44 return $this->properties[$par];
45 }
46 return '';
47 }
48 }
49
50 ?>