Example #1
0
 private function timesMap($n, $type)
 {
     $data = array();
     for ($i = 0; $i < $n; $i++) {
         $value = null;
         if ($type === 'uint32LE') {
             $value = $this->buffer->getUint32LE();
         } else {
             if ($type === 'uint16LE') {
                 $value = $this->buffer->getUint16LE();
             } else {
                 if ($type === 'float32') {
                     $value = $this->buffer->getFloat32();
                 } else {
                     if ($type === 'matrix33') {
                         $value = $this->buffer->getMatrix33();
                     } else {
                         if ($type === 'vector31') {
                             $value = $this->buffer->getVector31();
                         } else {
                             if ($type === 'uint8') {
                                 $value = $this->buffer->getUint8();
                             }
                         }
                     }
                 }
             }
         }
         array_push($data, $value);
     }
 }