You are here

private function KmlEncoder::isLocal in KML 8

Checks whether the url/path is local to this host.

1 call to KmlEncoder::isLocal()
KmlEncoder::encode in src/Encoder/KmlEncoder.php
Encodes data into the given format.

File

src/Encoder/KmlEncoder.php, line 186

Class

KmlEncoder
Encodes KML data in XML.

Namespace

Drupal\kml\Encoder

Code

private function isLocal($url) {
  $host = parse_url($url, PHP_URL_HOST);
  if (empty($host) || strcasecmp($host, \Drupal::request()
    ->getHost()) === 0) {
    return TRUE;
  }
}