public static function getDocument($input, $options = null)
    {
        $options = self::mergeOptions($options);

        $input = self::expand($input, $options);

        $processor = new Processor($options);

        return $processor->getDocument($input);
    }
public static function getDocument($input, $options = null)
    {
        $options = self::mergeOptions($options);

        $input = self::expand($input, $options);

        $processor = new Processor($options);

        return $processor->getDocument($input);
    }
public static function getDocument ( $ input , $ options = null ) { $ options = self :: mergeOptions ( $ options ) ; $ input = self :: expand ( $ input , $ options ) ; $ processor = new Processor ( $ options ) ; return $ processor -> getDocument ( $ input ) ; }
Load and parse a JSON-LD document

The document can be supplied directly as string, by passing a file
path, or by passing a URL.

Usage:

$document = JsonLD::getDocument('document.jsonld');
print_r($document->getGraphNames());

It is possible to configure the processing by setting the options
parameter accordingly. Available options are:

<dl>
<dt>base</dt>
<dd>The base IRI of the input document.</dd>

<dt>expandContext</dt>
<dd>An optional context to use additionally to the context embedded
in input when expanding the input.</dd>

<dt>documentFactory</dt>
<dd>The document factory.</dd>

<dt>documentLoader</dt>
<dd>The document loader.</dd>
</dl>

The options parameter might be passed as associative array or as
object.

@param string|JsonObject|array $input   The JSON-LD document to process.
@param null|array|JsonObject   $options Options to configure the processing.

@return Document The parsed JSON-LD document.

@throws JsonLdException

@api
Load and parse a JSON - LD document