Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
9 | class HttpRepository |
||
10 | { |
||
11 | private $manager; |
||
12 | |||
13 | private $stack; |
||
14 | |||
15 | public function __construct( |
||
16 | EntityManagerInterface $manager, |
||
17 | RequestStack $stack |
||
18 | ) { |
||
19 | $this->manager = $manager; |
||
20 | $this->stack = $stack; |
||
21 | } |
||
22 | |||
23 | public function buildForEntity(string $entityClassName) |
||
24 | { |
||
25 | $this->repo = new BaseRepository( |
||
|
|||
26 | $this->manager, |
||
27 | $this->manager->getClassMetadata($entityClassName) |
||
28 | ); |
||
29 | |||
30 | $this->repo->setRequest($this->stack->getCurrentRequest()); |
||
31 | |||
32 | $this->query = $this->repo |
||
33 | ->getQueryBuilderFactory() |
||
34 | ->filter() |
||
35 | ->sort() |
||
36 | ->getQueryBuilder() |
||
37 | ->getQuery(); |
||
38 | } |
||
39 | |||
40 | public function getSql() |
||
43 | } |
||
44 | |||
45 | public function getResult() |
||
48 | } |
||
49 | } |
||
50 |