Flarum\Formatter\Formatter::getComponent PHP Method

getComponent() protected method

Get a TextFormatter component.
protected getComponent ( string $name ) : mixed
$name string "renderer" or "parser"
return mixed
    protected function getComponent($name)
    {
        $cacheKey = 'flarum.formatter.' . $name;
        return $this->cache->rememberForever($cacheKey, function () use($name) {
            return $this->getConfigurator()->finalize()[$name];
        });
    }