-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapperFactory.php
More file actions
31 lines (27 loc) · 854 Bytes
/
MapperFactory.php
File metadata and controls
31 lines (27 loc) · 854 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
<?php
namespace Bdf\Prime\Mapper;
use Bdf\Prime\Cache\CacheInterface;
use Bdf\Prime\Entity\Hydrator\MapperHydrator;
use Bdf\Prime\Entity\Hydrator\MapperHydratorInterface;
use Bdf\Prime\Mapper\NameResolver\ResolverInterface;
use Bdf\Prime\Mapper\NameResolver\SuffixResolver;
use Bdf\Prime\ServiceLocator;
use Psr\SimpleCache\CacheInterface as Psr16CacheInterface;
use function is_subclass_of;
use function str_replace;
/**
* Default mapper factory
* The mapper class will be resolved by the mapper name resolver, and instantiated by calling the constructor
*
* Will be marked as final in 3.0
*/
/*final*/ class MapperFactory extends AbstractMapperFactory
{
/**
* {@inheritdoc}
*/
protected function instantiateMapper(ServiceLocator $locator, string $mapperClass): Mapper
{
return new $mapperClass($locator);
}
}