/** * Performs JSON-LD framing. * * @param mixed $input the JSON-LD object to frame. * @param stdClass $frame the JSON-LD frame to use. * @param assoc [$options] the framing options. * [base] the base IRI to use. * [embed] default @embed flag (default: true). * [explicit] default @explicit flag (default: false). * [omitDefault] default @omitDefault flag (default: false). * [optimize] optimize when compacting (default: false). * [resolver(url)] the URL resolver to use. * * @return stdClass the framed JSON-LD output. */ function jsonld_frame($input, $frame, $options = array()) { $p = new JsonLdProcessor(); return $p->frame($input, $frame, $options); }