public function EasyRdf_Graph::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::__construct()
Constructor
If no URI is given then an unnamed graph is created.
The $data parameter is optional and will be parsed into the graph if given.
The data format is optional and should be specified if it can't be guessed by EasyRdf.
Parameters
string $uri The URI of the graph:
string $data Data for the graph:
string $format The document type of the data (e.g. rdfxml):
Return value
object EasyRdf_Graph
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Graph.php, line 82
Class
- EasyRdf_Graph
- Container for collection of EasyRdf_Resources.
Code
public function __construct($uri = null, $data = null, $format = null) {
$this
->checkResourceParam($uri, true);
if ($uri) {
$this->uri = $uri;
$this->parsedUri = new EasyRdf_ParsedUri($uri);
if ($data) {
$this
->parse($data, $format, $this->uri);
}
}
}