public function loadFragment($source, $contentType, $options = [])
{
if ($this->supports($contentType)) {
$dom = new Document('1.0', 'UTF-8');
$fragment = $dom->createDocumentFragment();
$onMapKey = $this->_onMapKey;
if (isset($options[self::ON_MAP_KEY]) && is_callable($options[self::ON_MAP_KEY])) {
$this->onMapKey($options[self::ON_MAP_KEY]);
}
$this->transferTo($fragment, json_decode($source), $this->_recursions);
$this->_onMapKey = $onMapKey;
return $fragment;
}
return NULL;
}