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

Method encode

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

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

($intext, $outfile = false)

Source from the content-addressed store, hash-verified

458
459 //----------------------------------------------------------------------
460 public function encode($intext, $outfile = false)
461 {
462 $code = new QRcode();
463
464 if($this->eightbit) {
465 $code->encodeString8bit($intext, $this->version, $this->level);
466 } else {
467 $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive);
468 }
469
470 QRtools::markTime('after_encode');
471
472 if ($outfile!== false) {
473 file_put_contents($outfile, join("\n", QRtools::binarize($code->data)));
474 } else {
475 return QRtools::binarize($code->data);
476 }
477 }
478
479 //----------------------------------------------------------------------
480 public function encodePNG($intext, $outfile = false,$saveandprint=false)

Callers 15

encodePNGMethod · 0.95
textMethod · 0.45
tinymce.min.jsFile · 0.45
eFunction · 0.45
aFunction · 0.45
uFunction · 0.45
iFunction · 0.45
nFunction · 0.45
pFunction · 0.45
lFunction · 0.45
plugin.min.jsFile · 0.45
plugin.min.jsFile · 0.45

Calls 4

encodeString8bitMethod · 0.45
encodeStringMethod · 0.45
markTimeMethod · 0.45
binarizeMethod · 0.45

Tested by

no test coverage detected