Add PHP5-style constructor
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Dec 2016 09:51:20 +0000 (09:51 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Dec 2016 09:51:20 +0000 (09:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14616 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/Language.class.php

index afb5d379d9f2e303a387da0678931903d85a9e3b..5c95eaa8e31ca27d0ac7d9d9064dc55f5b09ed1b 100644 (file)
  */
 class Language {
     /**
-     * Class constructor
+     * Constructor (PHP5 style, required in some future version of PHP)
      * @param mixed $name
      */
-    function Language($name) {
+    function __construct($name) {
         /** @var mixed */
         $this->name = $name;
         /**
@@ -35,4 +35,12 @@ class Language {
          */
         $this->properties = array();
     }
+
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * @param string $name
+     */
+    function Language($name) {
+       self::__construct($name);
+    }
 }