private function encodeChar(&$data, $encoding, $seq, $text, &$i, &$counter, &$indcheck) {
        if (isset($seq[$i + 1]) && $seq[$i + 1] === 'F') {
            // We have a flag !!
            if ($text[$counter + 1] === 'F') {
                $number = $text[$counter + 2];
                $fnc = $this->fnc[$encoding][$number - 1];
                $indcheck[] = $fnc;
                $data[] = $this->code[$fnc];

                // Skip F + number
                $counter += 2;
            } else {
                // Not supposed
            }

            $i++;
        } else {
            if ($encoding === 2) {
                // We take 2 numbers in the same time
                $code = (int)substr($text, $counter, 2);
                $indcheck[] = $code;
                $data[] = $this->code[$code];
                $counter++;
                $i++;
            } else {
                $keys = ($encoding === 0) ? $this->keysA : $this->keysB;
                $pos = strpos($keys, $text[$counter]);
                $indcheck[] = $pos;
                $data[] = $this->code[$pos];
            }
        }

        $counter++;
    }
private function encodeChar(&$data, $encoding, $seq, $text, &$i, &$counter, &$indcheck) {
        if (isset($seq[$i + 1]) && $seq[$i + 1] === 'F') {
            // We have a flag !!
            if ($text[$counter + 1] === 'F') {
                $number = $text[$counter + 2];
                $fnc = $this->fnc[$encoding][$number - 1];
                $indcheck[] = $fnc;
                $data[] = $this->code[$fnc];

                // Skip F + number
                $counter += 2;
            } else {
                // Not supposed
            }

            $i++;
        } else {
            if ($encoding === 2) {
                // We take 2 numbers in the same time
                $code = (int)substr($text, $counter, 2);
                $indcheck[] = $code;
                $data[] = $this->code[$code];
                $counter++;
                $i++;
            } else {
                $keys = ($encoding === 0) ? $this->keysA : $this->keysB;
                $pos = strpos($keys, $text[$counter]);
                $indcheck[] = $pos;
                $data[] = $this->code[$pos];
            }
        }

        $counter++;
    }
private function encodeChar ( & $ data , $ encoding , $ seq , $ text , & $ i , & $ counter , & $ indcheck ) { if ( isset ( $ seq [ $ i + 1 ] ) && $ seq [ $ i + 1 ] === 'F' ) { // We have a flag !!
 if ( $ text [ $ counter + 1 ] === 'F' ) { $ number = $ text [ $ counter + 2 ] ; $ fnc = $ this -> fnc [ $ encoding ] [ $ number - 1 ] ; $ indcheck [ ] = $ fnc ; $ data [ ] = $ this -> code [ $ fnc ] ; // Skip F + number
 $ counter += 2 ; } else { // Not supposed
 } $ i ++ ; } else { if ( $ encoding === 2 ) { // We take 2 numbers in the same time
 $ code = ( int ) substr ( $ text , $ counter , 2 ) ; $ indcheck [ ] = $ code ; $ data [ ] = $ this -> code [ $ code ] ; $ counter ++ ; $ i ++ ; } else { $ keys = ( $ encoding === 0 ) ? $ this -> keysA : $ this -> keysB ; $ pos = strpos ( $ keys , $ text [ $ counter ] ) ; $ indcheck [ ] = $ pos ; $ data [ ] = $ this -> code [ $ pos ] ; } } $ counter ++ ; }
Encodes characters, base on its encoding and sequence

@param int[] $data
@param int $encoding
@param string $seq
@param string $text
@param int $i
@param int $counter
@param int[] $indcheck
Encodes characters base on its encoding and sequence