protected static function getData($code) {
        if(preg_match('/^\[&([a-z\d+\/]+=*)\]$/i', $code, $matches) !== 1) {
            throw new ChatlinkFormatException("Chatcode does not match the expected format.");
        }

        $base64 = $matches[1];

        $data = [];
        foreach (str_split(base64_decode($base64)) as $char) {
            $data[] = ord($char);
        }

        return $data;
    }
protected static function getData($code) {
        if(preg_match('/^\[&([a-z\d+\/]+=*)\]$/i', $code, $matches) !== 1) {
            throw new ChatlinkFormatException("Chatcode does not match the expected format.");
        }

        $base64 = $matches[1];

        $data = [];
        foreach (str_split(base64_decode($base64)) as $char) {
            $data[] = ord($char);
        }

        return $data;
    }
protected static function getData ( $ code ) { if ( preg_match ( '/^\[&([a-z\d+\/]+=*)\]$/i' , $ code , $ matches ) !== 1 ) { throw new ChatlinkFormatException ( "Chatcode does not match the expected format." ) ; } $ base64 = $ matches [ 1 ] ; $ data = [ ] ; foreach ( str_split ( base64_decode ( $ base64 ) ) as $ char ) { $ data [ ] = ord ( $ char ) ; } return $ data ; }
Parses base64 encoded chat code and returns byte array.

@param string $code
@return \int[]
@throws ChatlinkFormatException
Parses base64 encoded chat code and returns byte array .