function RdfParsingTrait::getInstanceParser
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
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.