From a4cc443a5273fd8abff71fa2e01ed841f458d9f3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Dec 2005 08:24:47 +0000 Subject: [PATCH] We want to play nice with PHP5, right? --- api.php | 10 +++++++++- date.php | 10 +++++++++- db_mysql.php | 10 +++++++++- functions.php | 10 +++++++++- kernel.php | 10 +++++++++- localize.php | 10 +++++++++- mail.php | 10 +++++++++- printer.php | 10 +++++++++- template.php | 12 ++++++++++-- template_fs.php | 10 +++++++++- xml.php | 10 +++++++++- 11 files changed, 100 insertions(+), 12 deletions(-) diff --git a/api.php b/api.php index 7e426a1..15a9f6d 100644 --- a/api.php +++ b/api.php @@ -131,7 +131,7 @@ class API /** * Constructor: cannot instantiate class directly */ - function API(&$registry) + function __construct(&$registry) { if (!is_subclass_of($this, 'API')) { @@ -146,6 +146,14 @@ class API $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function API(&$registry) + { + $this->__construct($registry); + } + /** * Constructs an error for the error handler to receive * diff --git a/date.php b/date.php index 847ee39..a5d2b4b 100644 --- a/date.php +++ b/date.php @@ -79,13 +79,21 @@ class Date /** * Constructor: sets the server's timezone */ - function Date(&$registry) + function __construct(&$registry) { $this->registry =& $registry; $this->servertz = date('Z', TIMENOW) / 3600; } + /** + * (PHP 4) Constructor + */ + function Date(&$registry) + { + $this->__construct($registry); + } + /** * Computes the total offset, taking into account all * the various options diff --git a/db_mysql.php b/db_mysql.php index 79ce812..1f230c4 100644 --- a/db_mysql.php +++ b/db_mysql.php @@ -97,11 +97,19 @@ class DB_MySQL /** * Constructor */ - function DB_MySQL(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function DB_MySQL(&$registry) + { + $this->__construct($registry); + } + /** * Connect to a the specified database * diff --git a/functions.php b/functions.php index b1e59b8..ae612a4 100644 --- a/functions.php +++ b/functions.php @@ -73,11 +73,19 @@ class Functions /** * Constructor */ - function Functions(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function Functions(&$registry) + { + $this->__construct($registry); + } + /** * Sets a cookie with a friendly interface * diff --git a/kernel.php b/kernel.php index 11902da..5ee547b 100644 --- a/kernel.php +++ b/kernel.php @@ -215,7 +215,7 @@ class Shared_Object_Framework /** * Constructor */ - function Shared_Object_Framework() + function __construct() { // error reporting set_error_handler(array(&$this, '_error_handler')); @@ -241,6 +241,14 @@ class Shared_Object_Framework } } + /** + * (PHP 4) Constructor + */ + function Shared_Object_Framework() + { + $this->__construct(); + } + /** * Prepares a path for being set as the sourcepath * diff --git a/localize.php b/localize.php index fcdac1f..8baf3f9 100644 --- a/localize.php +++ b/localize.php @@ -66,11 +66,19 @@ class Localize /** * Constructor */ - function Localize(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function Localize(&$registry) + { + $this->__construct($registry); + } + /** * Initializes the localization system with a table * diff --git a/mail.php b/mail.php index ede3d96..12b1f74 100644 --- a/mail.php +++ b/mail.php @@ -85,11 +85,19 @@ class Mail /** * Constructor */ - function Mail(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function Mail(&$registry) + { + $this->__construct($registry); + } + /** * Sends an email to the specified address with the specified * sender, subject, and body. diff --git a/printer.php b/printer.php index e550ab2..018eefa 100644 --- a/printer.php +++ b/printer.php @@ -61,11 +61,19 @@ class Printer /** * Constructor */ - function Printer(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function Printer(&$registry) + { + $this->__construct($registry); + } + /** * Creates a redirect to another page; constructs the header and footer (therefore execution stops) * diff --git a/template.php b/template.php index 90e2df0..9d1badd 100644 --- a/template.php +++ b/template.php @@ -109,11 +109,19 @@ class Template /** * Constructor */ - function Template(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } - + + /** + * (PHP 4) Constructor + */ + function Template(&$registry) + { + $this->__construct($registry); + } + /** * Takes an array of template names, loads them, and then stores * a parsed version for optimum speed. diff --git a/template_fs.php b/template_fs.php index 882a551..935e5b6 100644 --- a/template_fs.php +++ b/template_fs.php @@ -63,11 +63,19 @@ class Template_FS extends Template /** * Constructor */ - function Template_FS(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function Template_FS(&$registry) + { + $this->__construct($registry); + } + /** * Takes an array of template names, loads them, and then stores * a parsed version for optimum speed. diff --git a/xml.php b/xml.php index e8eef16..011d606 100644 --- a/xml.php +++ b/xml.php @@ -84,11 +84,19 @@ class XML /** * Constructor */ - function XML(&$registry) + function __construct(&$registry) { $this->registry =& $registry; } + /** + * (PHP 4) Constructor + */ + function XML(&$registry) + { + $this->__construct($registry); + } + /** * Parse an XML file * -- 2.22.5