private function KmlEncoder::relativizeUrl in KML 8
Makes sure the url is relative (strips scheme/host/port if present).
1 call to KmlEncoder::relativizeUrl()
- KmlEncoder::encode in src/
Encoder/ KmlEncoder.php - Encodes data into the given format.
File
- src/
Encoder/ KmlEncoder.php, line 161
Class
- KmlEncoder
- Encodes KML data in XML.
Namespace
Drupal\kml\EncoderCode
private function relativizeUrl($url) {
$components = parse_url($url);
$components['scheme'] = NULL;
$components['host'] = NULL;
$components['port'] = NULL;
return ltrim($this
->unparse_url($components), '/');
}