Happy New Year
[squirrelmail.git] / class / l10n / streams.class.php
index ca856777d78da0b797d369253cebfcfec06227fc..ca1efb51514f24fc4c05f77c28119b634332af6b 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with PHP-gettext; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA  02110-1301, USA
  *
- * @copyright © 2004-2006 The SquirrelMail Project Team
+ * @copyright 2004-2022 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -57,11 +58,13 @@ class FileReader {
     var $error=0;
 
     /**
+     * Constructor (PHP5 style, required in some future version of PHP)
      * reads translation file and fills translation input object properties
      * @param string $filename path to file
      * @return boolean false there is a problem with $filename
+TODO: Constructors should not return anything.
      */
-    function FileReader($filename) {
+    function __construct($filename) {
         // disable stat warnings for unreadable directories
         if (@file_exists($filename)) {
 
@@ -78,6 +81,17 @@ class FileReader {
         }
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * reads translation file and fills translation input object properties
+     * @param string $filename path to file
+     * @return boolean false there is a problem with $filename
+TODO: Constructors should not return anything.
+     */
+    function FileReader($filename) {
+        return self::__construct($filename);
+    }
+
     /**
      * reads data from current position
      * @param integer $bytes number of bytes to read