app/Map/Routing/Base.php
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $url;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->params = $provider['params'] ?? [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $start;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var float */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var array GeoJSON, route geometry format */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param array $provider
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lat
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $indirectPoints;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->start = ['lat' => $lat, 'lon' => $lon];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Set end of routing.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var array Custom routing parameters. */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $travelTime = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $geoJson;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var array */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Construct.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $params;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var float Travel time */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function setEnd(float $lat, float $lon): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->end = ['lat' => $lat, 'lon' => $lon];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var string API server URL. */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $end;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function __construct(array $provider)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->url = $provider['apiUrl'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lat .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get time of travel.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lat
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getTravelTime(): float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getDescription(): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->description;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var float[] */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var string Rout description */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function setStart(float $lat, float $lon): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lon
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get geojson - RFC 7946.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get description.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Function to parse points.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $description = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $distance = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Set start of routing.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lon
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getDistance(): float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->distance;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Function to calculate routing.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Add indirect point.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function addIndirectPoint(float $lat, float $lon): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get distance of routing.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
abstract public function parsePoints(): array;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getGeoJson(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->travelTime;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return float
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
abstract public function calculate();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** @var float[] */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param float $lon
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->indirectPoints[] = ['lat' => $lat, 'lon' => $lon];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->geoJson;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks