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

Method convertData

text-to-qr/lib/phpqrcode/qrinput.php:607–632  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

605
606 //----------------------------------------------------------------------
607 public function convertData()
608 {
609 $ver = $this->estimateVersion();
610 if($ver > $this->getVersion()) {
611 $this->setVersion($ver);
612 }
613
614 for(;;) {
615 $bits = $this->createBitStream();
616
617 if($bits < 0)
618 return -1;
619
620 $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level);
621 if($ver < 0) {
622 throw new Exception('WRONG VERSION');
623 return -1;
624 } else if($ver > $this->getVersion()) {
625 $this->setVersion($ver);
626 } else {
627 break;
628 }
629 }
630
631 return 0;
632 }
633
634 //----------------------------------------------------------------------
635 public function appendPaddingBit(&$bstream)

Callers 1

mergeBitStreamMethod · 0.95

Calls 5

estimateVersionMethod · 0.95
getVersionMethod · 0.95
setVersionMethod · 0.95
createBitStreamMethod · 0.95
getMinimumVersionMethod · 0.45

Tested by

no test coverage detected