fs = $fs; $this->templates = new TemplateLoader($fs); $this->argumentFormatLoader = new ArgumentFormatLoader($fs); } protected function getTemplate($name) { return $this->templates->load($name); } protected function getArgumentParser($name){ $format = $this->argumentFormatLoader->load($name); return new ArgumentParser($format); } protected function save($content, $path) { $this->makeDirectory($path); $this->fs->put($path, $content); } protected function makeDirectory($path) { if (!$this->fs->isDirectory(dirname($path))) { $this->fs->makeDirectory(dirname($path), 0777, true, true); } } }