getFilenameInBundle($filename, '.md'); if (!array_key_exists($filename, $this->markdownManagers)) { $this->markdownManagers[$filename] = new MarkdownManager($filename, $this->disk); } return $this->markdownManagers[$filename]; } /** * Save all markdown files that needs to be */ private function saveMarkdown() { foreach ($this->markdownManagers as $manager) { $manager->save(); } } /** * Return an instance of markdown manager for specified filename */ public function markdown(?string $filename = 'index'): MarkdownManager { return $this->registerMarkdownManager($filename); } }