----------------------------------------------------------------------
($intext, $outfile = false)
| 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) |
no test coverage detected