Skip to content

Commit 53f9c7a

Browse files
committed
Add PHP5 style constructors
Keep PHP4 ones for backwards compatibility
1 parent 7b31461 commit 53f9c7a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Text/LanguageDetect/Parser.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,20 @@ class Text_LanguageDetect_Parser extends Text_LanguageDetect
102102
* @access private
103103
* @param string $string string to be parsed
104104
*/
105-
function Text_LanguageDetect_Parser($string) {
105+
function __construct($string) {
106106
$this->_string = $string;
107107
}
108108

109+
/**
110+
* PHP 4 constructor for backwards compatibility.
111+
*
112+
* @access private
113+
* @param string $string string to be parsed
114+
*/
115+
function Text_LanguageDetect_Parser($string) {
116+
self::__construct($string);
117+
}
118+
109119
/**
110120
* Returns true if a string is suitable for parsing
111121
*

0 commit comments

Comments
 (0)