/** * Returns the options of the result * * @return OptionCollection */ public function getOptions() { if ($this->optionCollection === null) { $this->optionCollection = OptionCollection::factory(parent::getOptions()); } return $this->optionCollection; }
/** * Returns the results of a poll as a collection * * @return ResultCollection */ public function getResults() { if ($this->resultCollection === null) { $this->resultCollection = ResultCollection::factory(parent::getResults()); } return $this->resultCollection; }
/** * Returns a name entity * * @return Name */ public function getName() { if ($this->nameEntity === null) { $this->nameEntity = Name::factory(parent::getName()); } return $this->nameEntity; }
/** * Returns the ranks associated with the stats * * @return RankCollection */ public function getRanks() { if ($this->rankCollection === null) { $this->rankCollection = RankCollection::factory(parent::getRanks()); } return $this->rankCollection; }
/** * Returns the sort index with an option to make it zero based * * @param boolean $zeroBased OPTIONAL * * @return int */ public function getSortIndex($zeroBased = false) { $sortIndex = parent::getSortIndex(); if ($zeroBased) { --$sortIndex; } return $sortIndex; }
/** * Returns a stats entity * * @return Stats */ public function getStats() { if (!$this->hasStats()) { return null; } if ($this->statsEntity === null) { $this->statsEntity = Stats::factory(parent::getStats()); } return $this->statsEntity; }
/** * Returns the polls associated with a boardgame * * @return PollCollection */ public function getPolls() { if ($this->pollCollection === null) { $this->pollCollection = PollCollection::factory(parent::getPolls()); } return $this->pollCollection; }