| 1 | <?php |
||
| 14 | class DBALConfiguration extends AbstractOptions |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Set the cache key for the result cache. Cache key |
||
| 18 | * is assembled as "doctrine.cache.{key}" and pulled from |
||
| 19 | * service locator. |
||
| 20 | */ |
||
| 21 | protected string $resultCache = 'array'; |
||
|
|
|||
| 22 | |||
| 23 | /** |
||
| 24 | * Set the class name of the SQL Logger, or null, to disable. |
||
| 25 | */ |
||
| 26 | protected ?string $sqlLogger = null; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Keys must be the name of the type identifier and value is |
||
| 30 | * the class name of the Type |
||
| 31 | * |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | protected array $types = []; |
||
| 35 | |||
| 36 | public function setResultCache(string $resultCache) : self |
||
| 37 | { |
||
| 38 | $this->resultCache = $resultCache; |
||
| 39 | |||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getResultCache() : string |
||
| 44 | { |
||
| 45 | return 'doctrine.cache.' . $this->resultCache; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function setSqlLogger(string $sqlLogger) : void |
||
| 49 | { |
||
| 50 | $this->sqlLogger = $sqlLogger; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getSqlLogger() : ?string |
||
| 54 | { |
||
| 55 | return $this->sqlLogger; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param array $types |
||
| 60 | */ |
||
| 61 | public function setTypes(array $types) : self |
||
| 62 | { |
||
| 63 | $this->types = $types; |
||
| 64 | |||
| 65 | return $this; |
||
| 66 | } |
||
| 67 | 86 | ||
| 68 | public function getTypes() : array |
||
| 69 | 86 | { |
|
| 70 | return $this->types; |
||
| 71 | } |
||
| 72 | } |
||
| 73 |