4 * ContentType.class.php
6 * This file contains functions needed to handle content type headers
7 * (rfc2045) in mime messages.
9 * @copyright 2003-2022 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @package squirrelmail
18 * Class that handles content-type headers
19 * Class was named content_type in 1.3.0 and 1.3.1. It is used internally
20 * by rfc822header class.
21 * @package squirrelmail
37 * Auxiliary header information
38 * prepared with parseContentType() function in rfc822header class.
44 * Constructor (PHP5 style, required in some future version of PHP)
45 * Prepared type0 and type1 properties
46 * @param string $type content type string without auxiliary information
48 function __construct($type) {
49 $type = strtolower($type);
50 $pos = strpos($type, '/');
52 $this->type0
= substr($type, 0, $pos);
53 $this->type1
= substr($type, $pos+
1);
57 $this->properties
= array();
61 * Constructor (PHP4 style, kept for compatibility reasons)
62 * Prepared type0 and type1 properties
63 * @param string $type content type string without auxiliary information
65 function ContentType($type) {
66 self
::__construct($type);