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

Method encodeString

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

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

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

Source from the content-addressed store, hash-verified

3069
3070 //----------------------------------------------------------------------
3071 public function encodeString($string, $version, $level, $hint, $casesensitive)
3072 {
3073
3074 if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) {
3075 throw new Exception('bad hint');
3076 return NULL;
3077 }
3078
3079 $input = new QRinput($version, $level);
3080 if($input == NULL) return NULL;
3081
3082 $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive);
3083 if($ret < 0) {
3084 return NULL;
3085 }
3086
3087 return $this->encodeInput($input);
3088 }
3089
3090 //----------------------------------------------------------------------
3091 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