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) : self |
||
26 | { |
||
27 | $this->name = $name; |
||
28 | |||
29 | return $this; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Name of the collector |
||
34 | 2 | */ |
|
35 | public function getName() : string |
||
36 | 2 | { |
|
37 | 2 | return $this->name; |
|
38 | } |
||
39 | |||
40 | public function setConfiguration(?string $configuration) : void |
||
41 | { |
||
42 | $this->configuration = $configuration ? (string) $configuration : null; |
||
43 | } |
||
44 | 6 | ||
45 | /** |
||
46 | 6 | * Configuration service name (where to set the logger) |
|
47 | */ |
||
48 | public function getConfiguration() : string |
||
49 | { |
||
50 | return $this->configuration ? $this->configuration : 'doctrine.configuration.orm_default'; |
||
51 | } |
||
52 | 2 | ||
53 | public function setSqlLogger(?string $sqlLogger) : void |
||
54 | 2 | { |
|
55 | 2 | $this->sqlLogger = $sqlLogger ? (string) $sqlLogger : null; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * SQLLogger service name |
||
60 | */ |
||
61 | public function getSqlLogger() : ?string |
||
62 | 6 | { |
|
63 | return $this->sqlLogger; |
||
64 | 6 | } |
|
65 | } |
||
66 |