-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceInterface.php
More file actions
36 lines (30 loc) · 898 Bytes
/
Copy pathSourceInterface.php
File metadata and controls
36 lines (30 loc) · 898 Bytes
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
<?php
declare(strict_types=1);
namespace App\Source;
use App\Geo\Wgs84Transformer;
use App\Ngsi\NgsiEntity;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
/**
* Converts one input data set into NGSI-LD entities.
*
* An implementation owns its feed's origin, field names, quirks and target
* Smart Data Model. The broker and the import know none of that, so a new
* ENTER data set costs exactly one class.
*/
#[AutoconfigureTag('app.source')]
interface SourceInterface extends \Stringable, \JsonSerializable
{
public Definition $definition {
get;
}
/**
* Maps one feed record onto an NgsiEntity.
*
* @param array<string, mixed> $data
*/
public function createNgsiEntity(array $data, Wgs84Transformer $transformer): ?NgsiEntity;
/**
* @return array<string, mixed>
*/
public function toArray(): array;
}