phpvms/app/Contracts/RouteFinder.php
2019-08-20 08:48:45 -04:00

25 lines
655 B
PHP

<?php
namespace App\Contracts;
/**
* Abstract class for finding a route from a departure airport to an arrival airport
* Can allow for multiple, configurable methods for finding a route, whether it reaches
* out to a REST API or implement some sort of internal logic to look through a file
* or whatever the logic might be.
*
* Just one public-facing method needs to be implemented
*/
abstract class RouteFinder
{
/**
* Find a route from the departure ICAO to the arrival ICAO
*
* @param $dptIcao
* @param $arrIcao
*
* @return string
*/
abstract public function findRoute($dptIcao, $arrIcao): string;
}