Ejemplo n.º 1
0
 /**
  * Override for image
  */
 public function copyFromDbRow($row)
 {
     parent::copyFromDbRow($row);
     $this->id = (int) $this->id;
     $this->bracketId = (int) $this->bracketId;
     $this->seed = (int) $this->seed;
     $this->image = IMAGE_URL . '/' . base_convert($this->id, 10, 36) . '.jpg';
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  */
 public function __construct($round = null)
 {
     if (is_object($round)) {
         parent::copyFromDbRow($round);
         $this->final = (bool) ord($this->final);
         // Because PHP is retarded about return BIT types from MySQL
         if (isset($round->user_vote)) {
             $this->voted = $round->user_vote > 0;
             $this->votedCharacterId = (int) $round->user_vote;
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Override for image
  */
 public function copyFromDbRow($row)
 {
     parent::copyFromDbRow($row);
     $this->image = IMAGE_URL . '/' . base_convert($this->id, 10, 36) . '.jpg';
 }
Ejemplo n.º 4
0
 /**
  * Ints and bools things
  * @override
  */
 public function copyFromDbRow($row)
 {
     parent::copyFromDbRow($row);
     if ($row) {
         $this->id = (int) $this->id;
         $this->state = (int) $this->state;
         $this->start = (int) $this->start;
         $this->winnerCharacterId = $this->winnerCharacterId ? (int) $this->winnerCharacterId : null;
         $this->hidden = $this->hidden > 0;
     }
 }