46 private $configFilePool;
51 private $deploymentConfig;
58 private $commentParser;
73 Writer\FormatterInterface $formatter =
null,
76 $this->reader = $reader;
78 $this->configFilePool = $configFilePool;
80 $this->formatter = $formatter ?:
new Writer\PhpFormatter();
92 foreach ($this->reader->getFiles() as $file) {
93 if (!$configDirectory->isWritable($file)) {
127 $paths = $this->configFilePool->getPaths();
129 if (isset(
$paths[$fileKey])) {
130 $currentData = $this->reader->load($fileKey);
131 $currentComments = $this->commentParser->execute(
$paths[$fileKey]);
145 $writeFilePath =
$paths[$fileKey];
149 new Phrase(
'The "%1" deployment config file isn\'t writable.', [
$paths[$fileKey]])
159 $this->deploymentConfig->resetData();
__construct(Reader $reader, Filesystem $filesystem, ConfigFilePool $configFilePool, DeploymentConfig $deploymentConfig, Writer\FormatterInterface $formatter=null, CommentParser $commentParser=null)
saveConfig(array $data, $override=false, $pool=null, array $comments=[])