Exemplo n.º 1
0
 private function buildModel()
 {
     $nElements = getNumberOfElements();
     $features = array();
     for ($i = 0; $i < $nElements; ++$i) {
         $oogF = getElement($i);
         switch ($oogF->getType()) {
             case OOG_SLOT:
                 $features[$i] = new V2Slot($oogF);
                 break;
             case OOG_HOLE:
                 $features[$i] = new V2Hole($oogF);
                 break;
         }
     }
 }
Exemplo n.º 2
0
 private function buildModel()
 {
     $nElements = getNumberOfElements();
     $features = array();
     $ID = 0;
     for ($i = 0; $i < $nElements; ++$i) {
         $ID = $this->getFutureID($this->modelNumber, $i);
         switch ($this->getFutureType($this->modelNumber, $ID)) {
             case FEATURE_SLOT:
                 $futures[$i] = new V1Slot($this->modelNumber, $ID);
                 break;
             case FUTURE_HOLE:
                 $futures[$i] = new V1Hole($this->modelNumber, $ID);
                 break;
         }
     }
 }