public function EasyRdf_Parser_Redland::__construct

Constructor

Return value

object EasyRdf_Parser_Redland

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Redland.php, line 169

Class

EasyRdf_Parser_Redland
Class to parse RDF using Redland (librdf) C library.

Code

public function __construct() {
  if (extension_loaded('redland')) {
    $this->world = librdf_php_get_world();
    if (!$this->world) {
      throw new EasyRdf_Exception("Failed to initialise librdf world.");
    }
  }
  else {
    throw new EasyRdf_Exception("Redland PHP extension is not available.");
  }
}