| Total Complexity | 6 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Config |
||
| 9 | { |
||
| 10 | const CONFIG_KEY_ENABLED_ALWAYS = 'enabled_always'; |
||
| 11 | const CONFIG_KEY_OUTPUT_DIRECTORY = 'output_directory'; |
||
| 12 | const CONFIG_KEY_FORMAT = 'output'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var ContainerBuilder |
||
| 16 | */ |
||
| 17 | private $container; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $enabled; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $outputDirectory; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | private $outputFormats; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param ContainerBuilder $container |
||
| 36 | * @param array $config |
||
| 37 | */ |
||
| 38 | public function __construct(ContainerBuilder $container, $config) |
||
| 39 | { |
||
| 40 | $this->container = $container; |
||
| 41 | $this->enabled = $config[self::CONFIG_KEY_ENABLED_ALWAYS]; |
||
| 42 | $this->outputDirectory = $config[self::CONFIG_KEY_OUTPUT_DIRECTORY]; |
||
| 43 | $this->outputFormats = $config[self::CONFIG_KEY_FORMAT]; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Activate the extension |
||
| 48 | * |
||
| 49 | * @return void |
||
| 50 | */ |
||
| 51 | public function enableLogging() |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return boolean |
||
| 58 | */ |
||
| 59 | public function isEnabled() |
||
| 60 | { |
||
| 61 | return $this->enabled; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getOutputDirectory() |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return OutputPrinterInterface[] |
||
| 74 | */ |
||
| 75 | public function getOutputPrinters() |
||
| 86 | } |
||
| 87 | } |