/** * Enter description here ... * @param String $region * @param String $realm * @param String $character * @param Array $ignoreFields An array with all the fields that should not be loaded. Main consumers are quests and achievements - array('quests','achievements') * @return Returns FALSE if the character is not valid. */ function __construct($region, $realm, $character, $ignoreFields = FALSE) { if ($ignoreFields != FALSE) { $this->excludeFields($ignoreFields); } $this->region = strtolower($region); $this->realm = $realm; $this->name = $character; $jsonConnect = new jsonConnect(); $this->characterData = $jsonConnect->getCharacter($character, $realm, $region, implode(",", $this->fields)); if ($this->characterData != FALSE) { $this->name = $this->characterData['name']; $this->setTalentTreeSelected(); $this->race = new Races($region); $this->class = new Classes($region); } else { return FALSE; } return TRUE; }