Example #1
0
 public function __construct($data)
 {
     parent::__construct();
     $this->counter = new Counter();
     $this->starsArray = Arrays::allStarsArray();
     $this->sizeArray = Arrays::sizeTypeArray();
     $this->planetTypeArray = Arrays::planetTypeArray();
     $this->star = $data['star'];
     $data['size'] == 999 ? $this->size = [0, 1, 2, 3, 4, 5, 6, 7] : ($this->size = [$data['size']]);
     $data['class'] == 999 ? $this->class = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] : ($this->class = [$data['class']]);
     if ($data['size'] == 999 && $data['class'] == 999) {
         $this->addr = $this->starsArray[$data['star']];
         $this->nameStyle = 'all-all';
     }
     if ($data['size'] == 999 && $data['class'] != 999) {
         $this->addr = $this->starsArray[$data['star']] . $data['class'];
         $this->nameStyle = 'all-size';
     }
     if ($data['size'] != 999 && $data['class'] == 999) {
         $this->addr = $this->starsArray[$data['star']] . " " . $this->sizeArray[$data['size']];
         $this->nameStyle = 'all-class';
     }
     if ($data['size'] != 999 && $data['class'] != 999) {
         $this->addr = $this->starsArray[$data['star']] . $data['class'] . " " . $this->sizeArray[$data['size']];
         $this->nameStyle = 'one-one';
     }
     $this->name = $this->thirdChartName($this->locale, $this->nameStyle);
     $this->count();
 }
Example #2
0
 public function __construct($data)
 {
     parent::__construct();
     $this->counter = new Counter();
     $this->planetTypeArray = Arrays::planetTypeArray();
     $starsArray = Arrays::allStarsArray();
     $sizeArray = Arrays::sizeTypeArray();
     if ($data['size'] == 100) {
         $this->nameSize = 'size-all';
         $this->size = [0, 1, 2, 3, 4, 5, 6, 7];
     } else {
         $this->nameSize = 'size-one';
         $this->sizeHeader = $sizeArray[$data['size']];
         $this->size = [$data['size']];
     }
     if ($data['class'] == 100) {
         $this->nameClass = 'class-all';
         $this->class = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
     } else {
         $this->tempHeader = $data['class'];
         $this->nameClass = 'class-one';
         $this->class = [$data['class']];
     }
     $this->star = $data['star'];
     $this->starHeader = $starsArray[$data['star']];
     $data['step'] == 0 ? $this->step = 0.25 : ($this->step = $data['step']);
     switch ($data['planet']) {
         case 3:
             $this->planet = [3];
             $this->chartSelection = 'el';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 3210:
             $this->planet = [0, 1, 2, 3];
             $this->chartSelection = 'eltf';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 14:
             $this->planet = [1, 4];
             $this->chartSelection = 'ww';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 543210:
             $this->chartSelection = 'all';
             $this->charType = 2;
             $this->queryAll();
     }
     $this->headerName($this->locale);
 }
Example #3
0
 public function __construct($data)
 {
     parent::__construct();
     switch ($data['style']) {
         case 1:
             $this->planets = [0, 1, 2, 3];
             $this->chartSelection = 'life';
             break;
         case 2:
             $this->planets = [0];
             $this->chartSelection = 'metal';
             break;
         case 3:
             $this->planets = [1];
             $this->chartSelection = 'tw';
             break;
         case 4:
             $this->planets = [4];
             $this->chartSelection = 'w';
             break;
         case 5:
             $this->planets = [5];
             $this->chartSelection = 'aw';
             break;
         case 6:
             $this->planets = [3];
             $this->chartSelection = 'el';
             break;
     }
     $this->chartName($this->locale);
     $this->counter = new Counter();
     $this->sizeList = $this->counter->starSelect('size');
     $this->stopList = Arrays::stopList();
     $this->starsArray = Arrays::allStarsArray();
     $this->sizeArray = Arrays::sizeTypeArray();
     $this->total = $this->counter->planetSelect($this->planets);
     $this->starsList = $this->counter->starSelectExcluding($this->stopList);
     $this->searchNormal();
 }