Parser.php
public static function parseToIndex($input) {
        if (($input[0] == '{' || $input[0] == '[')) {
            return Arc2JsonLdConverter::jsonLdToIndex($input);
        } else {
            $parser = \ARC2::getRDFParser();
		    $parser->parse('', $input);
            return $parser->getSimpleIndex(false);
        }
    }
public static function parseToIndex($input) {
        if (($input[0] == '{' || $input[0] == '[')) {
            return Arc2JsonLdConverter::jsonLdToIndex($input);
        } else {
            $parser = \ARC2::getRDFParser();
		    $parser->parse('', $input);
            return $parser->getSimpleIndex(false);
        }
    }
public static function parseToIndex ( $ input ) { if ( ( $ input [ 0 ] == '{' || $ input [ 0 ] == '[' ) ) { return Arc2JsonLdConverter :: jsonLdToIndex ( $ input ) ; } else { $ parser = \ ARC2 :: getRDFParser ( ) ; $ parser -> parse ( '' , $ input ) ; return $ parser -> getSimpleIndex ( false ) ; } }
Parses the given input and returns an ARC2 index.
If the input is JsonLD the JsonLD parser is used, otherwise ARC2 is used.

@param string $input
Parses the given input and returns an ARC2 index . If the input is JsonLD the JsonLD parser is used otherwise ARC2 is used .