Classes Constructor syntax
| From: | David Russell | Date: | Wed, 17 Jul 2002 13:26:15 +0000 |
| Subject: | Classes Constructor syntax | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108073@lists.php.net to get a copy of this message | ||
Hi all,
I am finally spending some time converting a million and one functions into a class - this is for a software issue tracking system.
I have:
class issue {
var
var
...
function issue() { //default constructor
//initialise all variables to defaults, and start getting the stuff from forms} function issue($number) { //1 variable constructor
// Query database and populate variables accordingly} } My question is: will this work? does PHP OOP support more than one constructor? If my syntax is wrong, please let me know the correct syntax. Thanks David R