-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExternalableInterface.php
66 lines (57 loc) · 1.57 KB
/
ExternalableInterface.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/*
* This file is part of the Klipper package.
*
* (c) François Pluchino <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Klipper\Contracts\Model;
/**
* Interface of external ids model.
*
* @author François Pluchino <[email protected]>
*/
interface ExternalableInterface
{
/**
* Get the map of external ids.
*/
public function getExternalIds(): array;
/**
* Check if the external id of the service is defined.
*
* @param string $service The service name
*/
public function hasExternalId(string $service): bool;
/**
* Get the external id of the service.
*
* @param string $service The service name
*/
public function getExternalId(string $service): ?string;
/**
* Set or merge the external ids of service.
*
* @param array $serviceIds The map of service names and service ids
*/
public function setExternalIds(array $serviceIds): void;
/**
* Add the external id of service.
*
* @param string $service The service name
* @param string $id The service id
*/
public function addExternalId(string $service, string $id): void;
/**
* Remove the external id of service.
*
* @param string $service The service name
*/
public function removeExternalId(string $service): void;
/**
* Clear all external ids of services.
*/
public function clearExternalIds(): void;
}