|
@@ -58,11 +58,13 @@ class FileReader {
|
|
var $error=0;
|
|
var $error=0;
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Constructor (PHP5 style, required in some future version of PHP)
|
|
* reads translation file and fills translation input object properties
|
|
* reads translation file and fills translation input object properties
|
|
* @param string $filename path to file
|
|
* @param string $filename path to file
|
|
* @return boolean false there is a problem with $filename
|
|
* @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
|
|
// disable stat warnings for unreadable directories
|
|
if (@file_exists($filename)) {
|
|
if (@file_exists($filename)) {
|
|
|
|
|
|
@@ -79,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
|
|
* reads data from current position
|
|
* @param integer $bytes number of bytes to read
|
|
* @param integer $bytes number of bytes to read
|