public function EasyRdf_Graph::type in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::type()
Get the resource type of the graph
The type will be a shortened URI as a string. If the graph has multiple types then the type returned may be arbitrary. This method will return null if the resource has no type.
Return value
string A type assocated with the resource (e.g. foaf:Document)
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Graph.php, line 1399
Class
- EasyRdf_Graph
- Container for collection of EasyRdf_Resources.
Code
public function type($resource = null) {
$type = $this
->typeAsResource($resource);
if ($type) {
return EasyRdf_Namespace::shorten($type);
}
return null;
}