MCPcopy Create free account
hub / github.com/codemistic/Web-Development / encodeMode8

Method encodeMode8

text-to-qr/lib/phpqrcode/phpqrcode.php:1137–1155  ·  view source on GitHub ↗

----------------------------------------------------------------------

($version)

Source from the content-addressed store, hash-verified

1135
1136 //----------------------------------------------------------------------
1137 public function encodeMode8($version)
1138 {
1139 try {
1140 $bs = new QRbitstream();
1141
1142 $bs->appendNum(4, 0x4);
1143 $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size);
1144
1145 for($i=0; $i<$this->size; $i++) {
1146 $bs->appendNum(8, ord($this->data[$i]));
1147 }
1148
1149 $this->bstream = $bs;
1150 return 0;
1151
1152 } catch (Exception $e) {
1153 return -1;
1154 }
1155 }
1156
1157 //----------------------------------------------------------------------
1158 public function encodeModeKanji($version)

Callers 1

encodeBitStreamMethod · 0.95

Calls 2

appendNumMethod · 0.45
lengthIndicatorMethod · 0.45

Tested by

no test coverage detected