Jahren
01-15-2010, 06:43 PM
hi, i'd like to know why
oIdee->mIdTravail = null;
in this case
abstract class Objet_Modifiable{
public $mIdBd;
public $mIdTravail;
function __construct(){
$this->mIdBd = -1;
$this->mIdTravail = -1;
}
}
class Redaction_Idee extends Objet_Modifiable{
private $mTitre;
private $mEstDesactive;
//Constructeur
function __construct(){
$this->mTitre = "";
$this->mEstDesactive = false;
}
}
I create a new Idee object :
$oIdee = new Redaction_Idee();
var_dump($oIdee);
the var dump shows that both $mIdBd and $mIdTravail are NULL even tho I use a constructor to initilize the values.
what's wrong with my basic thinknig?
oIdee->mIdTravail = null;
in this case
abstract class Objet_Modifiable{
public $mIdBd;
public $mIdTravail;
function __construct(){
$this->mIdBd = -1;
$this->mIdTravail = -1;
}
}
class Redaction_Idee extends Objet_Modifiable{
private $mTitre;
private $mEstDesactive;
//Constructeur
function __construct(){
$this->mTitre = "";
$this->mEstDesactive = false;
}
}
I create a new Idee object :
$oIdee = new Redaction_Idee();
var_dump($oIdee);
the var dump shows that both $mIdBd and $mIdTravail are NULL even tho I use a constructor to initilize the values.
what's wrong with my basic thinknig?