/**
* ContentType.class.php
*
- * Copyright (c) 2003-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This file contains functions needed to handle content type headers
* (rfc2045) in mime messages.
*
+ * @copyright 2003-2018 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage mime
var $properties = '';
/**
- * Constructor function.
+ * Constructor (PHP5 style, required in some future version of PHP)
* Prepared type0 and type1 properties
* @param string $type content type string without auxiliary information
*/
- function ContentType($type) {
+ function __construct($type) {
+ $type = strtolower($type);
$pos = strpos($type, '/');
if ($pos > 0) {
$this->type0 = substr($type, 0, $pos);
}
$this->properties = array();
}
-}
-?>
\ No newline at end of file
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ * Prepared type0 and type1 properties
+ * @param string $type content type string without auxiliary information
+ */
+ function ContentType($type) {
+ self::__construct($type);
+ }
+}