configFile = $configFile; $this->filesystem = new Filesystem(); } public function configExists() { return $this->filesystem->exists($this->configFile); } public function save(array $data) { $config = array_merge( $this->getConfig(), $data ); $this->filesystem->dumpFile($this->configFile, Yaml::dump($config)); } public function getConfig() { return $this->configExists() ? Yaml::parse($this->configFile) : []; } }