1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Facile\MongoDbBundle\Event; |
||
6 | |||
7 | use Facile\MongoDbBundle\Models\Query; |
||
8 | use Symfony\Component\EventDispatcher\GenericEvent; |
||
9 | |||
10 | /** |
||
11 | * Class QueryEvent. |
||
12 | * |
||
13 | * @internal |
||
14 | */ |
||
15 | final class QueryEvent extends GenericEvent |
||
16 | { |
||
17 | const QUERY_PREPARED = 'facile_mongo_db.event.query_prepared'; |
||
18 | |||
19 | const QUERY_EXECUTED = 'facile_mongo_db.event.query_executed'; |
||
20 | |||
21 | /** |
||
22 | * QueryEvent constructor. |
||
23 | 13 | * |
|
24 | * @param Query $queryLog |
||
25 | 13 | * @param array $arguments |
|
26 | 13 | */ |
|
27 | public function __construct(Query $queryLog, array $arguments = []) |
||
28 | { |
||
29 | parent::__construct($queryLog, $arguments); |
||
30 | } |
||
31 | 1 | ||
32 | /** |
||
33 | 1 | * @return Query |
|
34 | */ |
||
35 | public function getQueryLog(): Query |
||
36 | { |
||
37 | return $this->getSubject(); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
38 | } |
||
39 | } |
||
40 |