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

Method getCode

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

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

()

Source from the content-addressed store, hash-verified

2936
2937 //----------------------------------------------------------------------
2938 public function getCode()
2939 {
2940 $ret;
2941
2942 if($this->count < $this->dataLength) {
2943 $row = $this->count % $this->blocks;
2944 $col = $this->count / $this->blocks;
2945 if($col >= $this->rsblocks[0]->dataLength) {
2946 $row += $this->b1;
2947 }
2948 $ret = $this->rsblocks[$row]->data[$col];
2949 } else if($this->count < $this->dataLength + $this->eccLength) {
2950 $row = ($this->count - $this->dataLength) % $this->blocks;
2951 $col = ($this->count - $this->dataLength) / $this->blocks;
2952 $ret = $this->rsblocks[$row]->ecc[$col];
2953 } else {
2954 return 0;
2955 }
2956 $this->count++;
2957
2958 return $ret;
2959 }
2960 }
2961
2962 //##########################################################################

Callers 1

encodeMaskMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected