예제 #1
0
 public function mergeBitStream()
 {
     if ($this->convertData() < 0) {
         return null;
     }
     $bstream = new QRbitstream();
     foreach ($this->items as $item) {
         $ret = $bstream->append($item->bstream);
         if ($ret < 0) {
             return null;
         }
     }
     return $bstream;
 }
예제 #2
0
 public function encodeModeStructure()
 {
     try {
         $bs = new QRbitstream();
         $bs->appendNum(4, 0x3);
         $bs->appendNum(4, ord($this->data[1]) - 1);
         $bs->appendNum(4, ord($this->data[0]) - 1);
         $bs->appendNum(8, ord($this->data[2]));
         $this->bstream = $bs;
         return 0;
     } catch (Exception $e) {
         return -1;
     }
 }