1 <?php
2 3 4
5 namespace Team3\PayU\PropertyExtractor;
6
7 use Psr\Log\LoggerInterface;
8 use Team3\PayU\PropertyExtractor\Reader\AnnotationReader;
9 use Team3\PayU\PropertyExtractor\Reader\ReaderInterface;
10 use Doctrine\Common\Annotations\AnnotationReader as DoctrineAnnotationReader;
11
12 13 14 15 16 17
18 class PropertyExtractorFactory implements PropertyExtractorFactoryInterface
19 {
20 21 22 23 24
25 public function build(LoggerInterface $logger)
26 {
27 return new Extractor(
28 $this->getReader($logger),
29 $logger
30 );
31 }
32
33 34 35 36
37 private function getReader(LoggerInterface $logger)
38 {
39 return new AnnotationReader(
40 new DoctrineAnnotationReader(),
41 $logger
42 );
43 }
44 }
45