public static function EasyRdf_Utils::removeFragmentFromUri in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Utils.php \EasyRdf_Utils::removeFragmentFromUri()
Remove the fragment from a URI (if it has one)
Parameters
mixed $uri A URI:
Return value
string The same URI with the fragment removed
1 call to EasyRdf_Utils::removeFragmentFromUri()
- EasyRdf_Graph::load in vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Graph.php - Load RDF data into the graph from a URI.
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Utils.php, line 98
Class
- EasyRdf_Utils
- Class containing static utility functions
Code
public static function removeFragmentFromUri($uri) {
$pos = strpos($uri, '#');
if ($pos === false) {
return $uri;
}
else {
return substr($uri, 0, $pos);
}
}