public function EasyRdf_Parser_Redland::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Redland.php \EasyRdf_Parser_Redland::__construct()
Constructor
Return value
object EasyRdf_Parser_Redland
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Parser/ Redland.php, line 168
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.");
}
}