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;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A mapper that returns the associative array from the database
|
2024-09-27 02:15:00 +00:00
|
|
|
*
|
|
|
|
|
* @implements Mapper<array<string|int, mixed>>
|
2024-06-08 23:58:45 +00:00
|
|
|
*/
|
|
|
|
|
class ArrayMapper implements Mapper
|
|
|
|
|
{
|
2024-09-27 02:15:00 +00:00
|
|
|
/**
|
|
|
|
|
* @inheritDoc
|
|
|
|
|
* @return array<string|int, mixed> The array given as the parameter
|
|
|
|
|
*/
|
2024-06-08 23:58:45 +00:00
|
|
|
public function map(array $result): array
|
|
|
|
|
{
|
|
|
|
|
return $result;
|
|
|
|
|
}
|
|
|
|
|
}
|