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

Method encodeMode8

text-to-qr/lib/phpqrcode/qrinput.php:124–142  ·  view source on GitHub ↗

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

($version)

Source from the content-addressed store, hash-verified

122
123 //----------------------------------------------------------------------
124 public function encodeMode8($version)
125 {
126 try {
127 $bs = new QRbitstream();
128
129 $bs->appendNum(4, 0x4);
130 $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size);
131
132 for($i=0; $i<$this->size; $i++) {
133 $bs->appendNum(8, ord($this->data[$i]));
134 }
135
136 $this->bstream = $bs;
137 return 0;
138
139 } catch (Exception $e) {
140 return -1;
141 }
142 }
143
144 //----------------------------------------------------------------------
145 public function encodeModeKanji($version)

Callers 1

encodeBitStreamMethod · 0.95

Calls 2

appendNumMethod · 0.45
lengthIndicatorMethod · 0.45

Tested by

no test coverage detected