public function __construct(array $globals = null) { $this->version = new VersionInfo('writeme', '0.1.0', '<<green>>%s<<reset>> <<yellow>>%s<<reset>>'); $clif = new CliFactory(); if ($globals === null) { $globals = $GLOBALS; } $this->context = $clif->newContext($globals); $this->stdio = Stdio::create(); $this->placeholders = new PlaceholderCollection([new Frontmatter(), new TOC(), new API(), new Changelog(), new Badge()]); $placeholderDocs = new PlaceholderDocs(); $placeholderDocs->setPlaceholderCollection($this->placeholders); $this->placeholders->add($placeholderDocs); $this->converter = new Converter(); }