Hi,
Is it possible to define more than one constructor in a class and, if so, how is it possible to call an other constructor ?
Example :
class myClass
{
var $field ;
function myClass($inField)
{
$this->$field = $inField ;
}
function myClass()
{
this("Default field name") ;
// It is Java's typical call
// How can this be done in PHP 4 ?
}
}
I gave a simple example on purpose. I know that the heqder of the first constructorcan be written like that :
function myClass($inField = "Default field name")
However, I need more sophisticated stuff and this trick is not enough.
Romain