-
Notifications
You must be signed in to change notification settings - Fork 1
/
PathFinderInterface.php
38 lines (34 loc) · 1.32 KB
/
PathFinderInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* This file is part of the opportus/object-mapper project.
*
* Copyright (c) 2018-2022 Clément Cazaud <clement.cazaud@gmail.com>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
namespace Opportus\ObjectMapper\PathFinder;
use Opportus\ObjectMapper\Exception\InvalidOperationException;
use Opportus\ObjectMapper\Route\RouteCollection;
use Opportus\ObjectMapper\SourceInterface;
use Opportus\ObjectMapper\TargetInterface;
/**
* The path finder interface.
*
* @package Opportus\ObjectMapper\PathFinder
* @author Clément Cazaud <clement.cazaud@gmail.com>
* @license https://github.com/opportus/object-mapper/blob/master/LICENSE MIT
*/
interface PathFinderInterface
{
/**
* Gets the routes connecting the source points with the target points.
*
* @param SourceInterface $source A source to map data from
* @param TargetInterface $target A target to map data to
* @return RouteCollection A route collection connecting the
* source points with the target points
* @throws InvalidOperationException If the operation fails for any reason
*/
public function getRoutes(SourceInterface $source, TargetInterface $target): RouteCollection;
}