Beispiel #1
0
 /**
  * Parses the coefficient properties of GROUP 1050
  *
  * @param FileReader $file
  */
 protected function parseGroup1050(FileReader $file)
 {
     $coeffStart = [];
     $coeffCount = [];
     $coeffSets = [];
     $nameLen = ceil($this->const->count() / 10);
     $valueLen = ceil($this->const->count() / 3);
     // Seek to GROUP 1050 line 1
     $file->seek(22 + $nameLen + $valueLen);
     foreach (explode(' ', $file->current()) as $i) {
         if ($i != '') {
             $coeffStart[] = (int) $i;
         }
     }
     // Seek to GROUP 1050 line 2
     $file->seek(23 + $nameLen + $valueLen);
     foreach (explode(' ', $file->current()) as $i) {
         if ($i != '') {
             $coeffCount[] = (int) $i;
         }
     }
     // Seek to GROUP 1050 line 3
     $file->seek(24 + $nameLen + $valueLen);
     foreach (explode(' ', $file->current()) as $i) {
         if ($i != '') {
             $coeffSets[] = (int) $i;
         }
     }
     // Save coefficient values to properties
     $this->coeffStart = $coeffStart;
     $this->coeffCount = $coeffCount;
     $this->coeffSets = $coeffSets;
 }