1 | <?php |
||
14 | class SQLLoggerCollectorOptions extends AbstractOptions |
||
15 | { |
||
16 | /** @var string name to be assigned to the collector */ |
||
17 | protected string $name = 'orm_default'; |
||
|
|||
18 | |||
19 | /** @var string|null service name of the configuration where the logger has to be put */ |
||
20 | protected ?string $configuration = null; |
||
21 | |||
22 | /** @var string|null service name of the SQLLogger to be used */ |
||
23 | protected ?string $sqlLogger = null; |
||
24 | |||
25 | public function setName(string $name) : void |
||
26 | { |
||
27 | $this->name = (string) $name; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Name of the collector |
||
32 | */ |
||
33 | public function getName() : string |
||
34 | 2 | { |
|
35 | return $this->name; |
||
36 | 2 | } |
|
37 | 2 | ||
38 | public function setConfiguration(?string $configuration) : void |
||
39 | { |
||
40 | $this->configuration = $configuration ? (string) $configuration : null; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | 6 | * Configuration service name (where to set the logger) |
|
45 | */ |
||
46 | 6 | public function getConfiguration() : string |
|
47 | { |
||
48 | return $this->configuration ? $this->configuration : 'doctrine.configuration.orm_default'; |
||
49 | } |
||
50 | |||
51 | public function setSqlLogger(?string $sqlLogger) : void |
||
52 | 2 | { |
|
53 | $this->sqlLogger = $sqlLogger ? (string) $sqlLogger : null; |
||
54 | 2 | } |
|
55 | 2 | ||
56 | /** |
||
57 | * SQLLogger service name |
||
58 | */ |
||
59 | public function getSqlLogger() : ?string |
||
60 | { |
||
61 | return $this->sqlLogger; |
||
62 | 6 | } |
|
63 | } |
||
64 |