private function RdfParsingTrait::getInstanceParser in Drupal 9
Gets a new instance of EasyRdf\Parser\Rdfa or EasyRdf_Parser_Rdfa.
@todo Clean this up in drupal:10.0.0.
Return value
\EasyRdf\Parser\Rdfa|\EasyRdf_Parser_Rdfa The instance.
See also
https://www.drupal.org/node/3176468
5 calls to RdfParsingTrait::getInstanceParser()
- RdfParsingTrait::getElementByRdfTypeCount in core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php - Counts the number of resources of the provided type.
- RdfParsingTrait::getElementRdfType in core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php - Gets type of RDF Element.
- RdfParsingTrait::hasRdfChildProperty in core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php - Checks if a html document contains a resource with a given property value.
- RdfParsingTrait::hasRdfProperty in core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php - Checks if a html document contains a resource with a given property value.
- RdfParsingTrait::rdfElementIsBlankNode in core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php - Checks if RDF Node property is blank.
File
- core/
modules/ rdf/ tests/ src/ Traits/ RdfParsingTrait.php, line 159
Class
- RdfParsingTrait
- Defines a trait for parsing RDF properties from HTML.
Namespace
Drupal\Tests\rdf\TraitsCode
private function getInstanceParser() {
if (class_exists('EasyRdf\\Parser\\Rdfa')) {
return new Rdfa();
}
return new \EasyRdf_Parser_Rdfa();
}