Exemplo n.º 1
0
 /**
  * Returns the options of the result
  *
  * @return OptionCollection
  */
 public function getOptions()
 {
     if ($this->optionCollection === null) {
         $this->optionCollection = OptionCollection::factory(parent::getOptions());
     }
     return $this->optionCollection;
 }
Exemplo n.º 2
0
Arquivo: Poll.php Projeto: janiv/shelf
 /**
  * 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;
 }
Exemplo n.º 3
0
 /**
  * Returns a name entity
  *
  * @return Name
  */
 public function getName()
 {
     if ($this->nameEntity === null) {
         $this->nameEntity = Name::factory(parent::getName());
     }
     return $this->nameEntity;
 }
Exemplo n.º 4
0
 /**
  * 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;
 }
Exemplo n.º 5
0
 /**
  * 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;
 }
Exemplo n.º 6
0
 /**
  * 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;
 }
Exemplo n.º 7
0
 /**
  * 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;
 }