2026-03-30 09:10:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-09-11 16:55:12 +02:00
|
|
|
namespace Uwil\ArcadiaApiPhpClient\Mapper;
|
2026-03-30 09:10:44 +02:00
|
|
|
|
2026-09-11 16:55:12 +02:00
|
|
|
use Uwil\ArcadiaApiPhpClient\Lib\ApiDto\Dto;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\Lib\ApiValueObject\SortColumn;
|
2026-03-30 09:10:44 +02:00
|
|
|
|
|
|
|
|
interface Mapper
|
|
|
|
|
{
|
|
|
|
|
public function getTable(): string;
|
|
|
|
|
|
|
|
|
|
public function getTableKey(): string;
|
|
|
|
|
|
|
|
|
|
/** @return array<string,string> */
|
|
|
|
|
public function getPropertiesMap(): array;
|
|
|
|
|
|
|
|
|
|
public function getValueFor(string | SortColumn $column): string;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param array<string,null|mixed> $data
|
|
|
|
|
*
|
2026-09-11 16:55:12 +02:00
|
|
|
* @throws \Uwil\ArcadiaApiPhpClient\Exception\UnexpectedErrorException If mapping fails.
|
2026-03-30 09:10:44 +02:00
|
|
|
*/
|
|
|
|
|
public function toDto(array $data): Dto;
|
|
|
|
|
}
|