Somehow my constructor doesn`t seem to work properly:
private $matchId;
private $region;
private $date;
private $wAdc;
private $wSupp;
private $lAdc;
private $lSupp;
private $summoners;
public function _construct($matchId, $region, $date) {
$this->matchId = $matchId;
$this->region = $region;
$this->date = $date;
$this->summoners = array();
$this->wAdc = null;
$this->wSupp = null;
$this->lAdc = null;
$this->lSupp = null;
}
public function getMatchId() {
return $this->matchId;
}
And here the object creation:
$matchObj = new match($matchId, $region, $created);
$matches[] = $matchObj;
echo "a: ". $matchId . " ";
echo "b: ". $matchObj->getMatchId() . " ";
And here the output I get when I run the script in my browser:
a: 1936074952 b:
So the object variable doesn`t seem to get set properly. Could anybody help me out?