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

Method encodeString8bit

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

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

($string, $version, $level)

Source from the content-addressed store, hash-verified

3050
3051 //----------------------------------------------------------------------
3052 public function encodeString8bit($string, $version, $level)
3053 {
3054 if(string == NULL) {
3055 throw new Exception('empty string!');
3056 return NULL;
3057 }
3058
3059 $input = new QRinput($version, $level);
3060 if($input == NULL) return NULL;
3061
3062 $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string));
3063 if($ret < 0) {
3064 unset($input);
3065 return NULL;
3066 }
3067 return $this->encodeInput($input);
3068 }
3069
3070 //----------------------------------------------------------------------
3071 public function encodeString($string, $version, $level, $hint, $casesensitive)

Callers 2

encodeRAWMethod · 0.45
encodeMethod · 0.45

Calls 3

encodeInputMethod · 0.95
str_splitFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected