|
Posted by Jim Michaels on 10/13/72 11:39
"Ivαn Sαnchez Ortega" <i.punto.sanchez--@rroba--mirame.punto.net> wrote in
message news:1h20b3-kej.ln1@blackspark.escomposlinux.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Janwillem Borleffs wrote:
>
>> Incorrect constructor name; it should be Lead instead of Leads.
>
> Note: In PHP5, it is preferred to name the constructor "__construct"
> instead
> of naming it as the class name. That just avoids things like this, you
> know.
>
I don't remember seeing that in the manual for a constructor, so how is it
supported? I see
class Vegetable {
var $edible;
var $color;
function Vegetable($edible, $color="green")
{
$this->edible = $edible;
$this->color = $color;
}
function is_edible()
{
return $this->edible;
}
function what_color()
{
return $this->color;
}
} // end of class Vegetable
> - --
> - ----------------------------------
> Ivαn Sαnchez Ortega -i-punto-sanchez--arroba-mirame-punto-net
>
> Why one contradicts. One often contradicts an opinion when it is really
> only
> the way in which it has been presented that is unsympathetic.
> -- Friedrich Nietzsche [1844 - 1900]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
>
> iD8DBQFD3Vq23jcQ2mg3Pc8RAnBIAJ9rO31gH1aAQcVWRi5S9lwDj0zdMgCgh4YA
> lsTg11aE545tDFFXlewzApA=
> =SP+g
> -----END PGP SIGNATURE-----
Navigation:
[Reply to this message]
|