src/qrencode.php
public function getCode()
        {
            $ret;

            if($this->count < $this->dataLength) {
                $row = $this->count % $this->blocks;
                $col = $this->count / $this->blocks;
                if($col >= $this->rsblocks[0]->dataLength) {
                    $row += $this->b1;
                }
                $ret = $this->rsblocks[$row]->data[$col];
            } else if($this->count < $this->dataLength + $this->eccLength) {
                $row = ($this->count - $this->dataLength) % $this->blocks;
                $col = ($this->count - $this->dataLength) / $this->blocks;
                $ret = $this->rsblocks[$row]->ecc[$col];
            } else {
                return 0;
            }
            $this->count++;
            
            return $ret;
        }
public function getCode()
        {
            $ret;

            if($this->count < $this->dataLength) {
                $row = $this->count % $this->blocks;
                $col = $this->count / $this->blocks;
                if($col >= $this->rsblocks[0]->dataLength) {
                    $row += $this->b1;
                }
                $ret = $this->rsblocks[$row]->data[$col];
            } else if($this->count < $this->dataLength + $this->eccLength) {
                $row = ($this->count - $this->dataLength) % $this->blocks;
                $col = ($this->count - $this->dataLength) / $this->blocks;
                $ret = $this->rsblocks[$row]->ecc[$col];
            } else {
                return 0;
            }
            $this->count++;
            
            return $ret;
        }
public function getCode ( ) { $ ret ; if ( $ this -> count < $ this -> dataLength ) { $ row = $ this -> count % $ this -> blocks ; $ col = $ this -> count / $ this -> blocks ; if ( $ col >= $ this -> rsblocks [ 0 ] -> dataLength ) { $ row += $ this -> b1 ; } $ ret = $ this -> rsblocks [ $ row ] -> data [ $ col ] ; } else if ( $ this -> count < $ this -> dataLength + $ this -> eccLength ) { $ row = ( $ this -> count - $ this -> dataLength ) % $ this -> blocks ; $ col = ( $ this -> count - $ this -> dataLength ) / $ this -> blocks ; $ ret = $ this -> rsblocks [ $ row ] -> ecc [ $ col ] ; } else { return 0 ; } $ this -> count ++ ; return $ ret ; }
Gets ECC code
@return Integer ECC byte for current object position
Gets ECC code