build($action); } class AboutTheme { private $theme_config; private function render(): string { global $config; return Element('themes/about/about.html', [ 'theme_config' => $this->theme_config, 'config' => $config, 'board_list' => createBoardlist(), ]); } public function __construct(array $theme_config) { $this->theme_config = $theme_config; } public function build(string $action): void { global $config; if ($action == 'all') { $about_page = $this->render(); $home = $config['dir']['home']; $path = $this->theme_config['path']; file_write($home . $path, $about_page); } } }