private function setParseA($text, &$currentMode) {
        $tmp = preg_quote($this->keysA, '/');

        // If we accept the ~ for special character, we must allow it.
        if ($this->tilde) {
            $tmp .= '~';
        }

        $match = array();
        if (preg_match('/[^' . $tmp . ']/', $text, $match) === 1) {
            // We found something not allowed
            throw new CINParseException('code128', 'The text "' . $text . '" can\'t be parsed with the Table A. The character "' . $match[0] . '" is not allowed.');
        } else {
            $latch = ($currentMode === 'A') ? '' : '0';
            $currentMode = 'A';

            return $latch . $this->getSequenceParsed($text, $currentMode);
        }
    }
private function setParseA($text, &$currentMode) {
        $tmp = preg_quote($this->keysA, '/');

        // If we accept the ~ for special character, we must allow it.
        if ($this->tilde) {
            $tmp .= '~';
        }

        $match = array();
        if (preg_match('/[^' . $tmp . ']/', $text, $match) === 1) {
            // We found something not allowed
            throw new CINParseException('code128', 'The text "' . $text . '" can\'t be parsed with the Table A. The character "' . $match[0] . '" is not allowed.');
        } else {
            $latch = ($currentMode === 'A') ? '' : '0';
            $currentMode = 'A';

            return $latch . $this->getSequenceParsed($text, $currentMode);
        }
    }
private function setParseA ( $ text , & $ currentMode ) { $ tmp = preg_quote ( $ this -> keysA , '/' ) ; // If we accept the ~ for special character, we must allow it.
 if ( $ this -> tilde ) { $ tmp .= '~' ; } $ match = array ( ) ; if ( preg_match ( '/[^' . $ tmp . ']/' , $ text , $ match ) === 1 ) { // We found something not allowed
 throw new CINParseException ( 'code128' , 'The text "' . $ text . '" can\'t be parsed with the Table A. The character "' . $ match [ 0 ] . '" is not allowed.' ) ; } else { $ latch = ( $ currentMode === 'A' ) ? '' : '0' ; $ currentMode = 'A' ; return $ latch . $ this -> getSequenceParsed ( $ text , $ currentMode ) ; } }
Parses the text and returns the appropriate sequence for the Table A.

@param string $text
@param string $currentMode
@return string
Parses the text and returns the appropriate sequence for the Table A .