ldc-arcadia-genesis-php-client/src/Mapper/Mapper.php

28 lines
673 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Uwil\ArcadiaGenesisPhpClient\Mapper;
use Uwil\ArcadiaGenesisPhpClient\Lib\ApiDto\Dto;
use Uwil\ArcadiaGenesisPhpClient\Lib\ApiValueObject\SortColumn;
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
*
* @throws \Uwil\ArcadiaGenesisPhpClient\Exception\UnexpectedErrorException If mapping fails.
*/
public function toDto(array $data): Dto;
}