prettyFormatLocation() публичный статический Метод

Returns a prettified location result.
public static prettyFormatLocation ( array | false $locationInfo, string $newline = " ", boolean $includeExtra = false ) : string
$locationInfo array | false
$newline string The line separator (ie, \n or
).
$includeExtra boolean Whether to include ISP/Organization info.
Результат string
Пример #1
0
 /**
  * Echo's a pretty formatted location using a specific LocationProvider.
  *
  * Input:
  *   The 'id' query parameter must be set to the ID of the LocationProvider to use.
  *
  * Output:
  *   The pretty formatted location that was obtained. Will be HTML.
  */
 public function getLocationUsingProvider()
 {
     $providerId = Common::getRequestVar('id');
     $provider = LocationProvider::getProviderById($providerId);
     if (empty($provider)) {
         throw new Exception("Invalid provider ID: '{$providerId}'.");
     }
     $location = $provider->getLocation(array('ip' => IP::getIpFromHeader(), 'lang' => Common::getBrowserLanguage(), 'disable_fallbacks' => true));
     $location = LocationProvider::prettyFormatLocation($location, $newline = '<br/>', $includeExtra = true);
     return $location;
 }