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

Method encodeString

text-to-qr/lib/phpqrcode/qrencode.php:263–280  ·  view source on GitHub ↗

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

($string, $version, $level, $hint, $casesensitive)

Source from the content-addressed store, hash-verified

261
262 //----------------------------------------------------------------------
263 public function encodeString($string, $version, $level, $hint, $casesensitive)
264 {
265
266 if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) {
267 throw new Exception('bad hint');
268 return NULL;
269 }
270
271 $input = new QRinput($version, $level);
272 if($input == NULL) return NULL;
273
274 $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive);
275 if($ret < 0) {
276 return NULL;
277 }
278
279 return $this->encodeInput($input);
280 }
281
282 //----------------------------------------------------------------------
283 public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false)

Callers 2

encodeRAWMethod · 0.45
encodeMethod · 0.45

Calls 2

encodeInputMethod · 0.95
splitStringToQRinputMethod · 0.45

Tested by

no test coverage detected