private function renderConsole()
{
$return = "";
if ($this->errors) {
return implode("\n", $this->errors);
}
if ($this->warnings) {
$return .= "---\nWarning(s):\n";
$return .= implode("\n", $this->warnings);
$return .= "\n---\n\n";
}
$return .= "Duration: {$this->durationInTraffic['text']}\n";
$return .= "Distance: {$this->distance['text']}\n";
$return .= $this->delay ? "Traffic Delay: {$this->delay}s" : "No Traffic Delay";
$return .= "\n\n";
$return .= "Directions:\n";
$return .= "\tFrom: {$this->originAddress}\n";
$return .= "\tTo: {$this->destinationAddress}\n\n";
$return .= "Geolocation:\n";
$return .= "\tLatitude: {$this->latitude}\n";
$return .= "\tLongitude: {$this->longitude}\n";
$return .= "\tAccuracy: {$this->accuracy}\n\n";
if ($this->googleMapsLink) {
$return .= "Google Maps URL: {$this->googleMapsLink}\n\n";
}
return $return;
}