Files

26 lines
579 B
PHP
Raw Permalink Normal View History

2024-07-20 21:47:21 -04:00
<?php
/**
* @author Daniel J. Summers <daniel@bitbadger.solutions>
* @license MIT
*/
declare(strict_types=1);
2024-06-08 23:58:45 +00:00
namespace BitBadger\PDODocument\Mapper;
/**
* Map an associative array of results to a domain class
*
* @template T The type of document retrieved by this mapper
*/
interface Mapper
{
/**
* Map a result to the specified type
*
2024-09-27 02:15:00 +00:00
* @param array<string|int, mixed> $result An associative array representing a single database result
2024-06-08 23:58:45 +00:00
* @return T The item mapped from the given result
*/
public function map(array $result): mixed;
}