class ErrorHandler {
/**
- * Constructor
+ * Constructor (PHP5 style, required in some future version of PHP)
* @param object $oTemplate Template object
* @param string $sTemplateFile Template containing the error template
* @since 1.5.1
*/
- function ErrorHandler(&$oTemplate, $sTemplateFile) {
+ function __construct(&$oTemplate, $sTemplateFile) {
# echo 'init error handler...';
$this->TemplateName = $sTemplateFile;
$this->Template =& $oTemplate;
$this->Template->assign('delayed_errors', $this->delayed_errors);
}
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ * @param object $oTemplate Template object
+ * @param string $sTemplateFile Template containing the error template
+ * @since 1.5.1
+ */
+ function ErrorHandler(&$oTemplate, $sTemplateFile) {
+ self::__construct($oTemplate, $sTemplateFile);
+ }
+
/**
* Sets the error template
* @since 1.5.1
}
/**
+ * Constructor (PHP5 style, required in some future version of PHP)
* constructor that requires StreamReader object
* @param object $Reader
* @return boolean false, if some error with stream
+TODO: Constructors should not return anything.
*/
function gettext_reader($Reader) {
$MAGIC1 = (int) ((222) | (18<<8) | (4<<16) | (149<<24));
$this->_HASHED = array();
}
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ * constructor that requires StreamReader object
+ * @param object $Reader
+ * @return boolean false, if some error with stream
+TODO: Constructors should not return anything.
+ */
+ function gettext_reader($Reader) {
+ return self::__construct($Reader);
+ }
+
/**
* @param boolean $translations do translation have to be loaded
*/
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)) {
}
}
+ /**
+ * 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
/**
- * Constructor
+ * Constructor (PHP5 style, required in some future version of PHP)
*
* Please do not call directly. Use Template::construct_template().
*
* @param string $template_id the template ID
*
*/
- function PHP_Template($template_id) {
+ function __construct($template_id) {
//FIXME: find a way to test that this is ONLY ever called
// from parent's construct_template() method (I doubt it
// is worth the trouble to parse the current stack trace)
}
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ *
+ * Please do not call directly. Use Template::construct_template().
+ *
+ * @param string $template_id the template ID
+ *
+ */
+ function PHP_Template($template_id) {
+ self::__construct($template_id);
+ }
+
/**
* Assigns values to template variables
*
var $other_template_engine_objects = array();
/**
- * Constructor
+ * Constructor (PHP5 style, required in some future version of PHP)
*
* Please do not call directly. Use Template::construct_template().
*
* @param string $template_set_id the template ID
*
*/
- function Template($template_set_id) {
+ function __construct($template_set_id) {
//FIXME: find a way to test that this is ONLY ever called
// from the construct_template() method (I doubt it
// is worth the trouble to parse the current stack trace)
}
+ /**
+ * Constructor (PHP4 style, kept for compatibility reasons)
+ *
+ * Please do not call directly. Use Template::construct_template().
+ *
+ * @param string $template_set_id the template ID
+ *
+ */
+ function Template($template_set_id) {
+ self::__construct($template_set_id);
+ }
+
/**
* Construct Template
*