1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 06:00:24 +02:00

Autoload the cached PHP renderer

This commit is contained in:
Toby Zerner
2015-08-26 09:46:20 +09:30
parent bde590b5a6
commit d07182622e

View File

@@ -32,7 +32,6 @@ class Formatter
event(new FormatterConfigurator($configurator));
return $configurator;
}
@@ -63,6 +62,12 @@ class Formatter
protected function getRenderer(CommentPost $post)
{
spl_autoload_register(function ($class) {
if (file_exists($file = storage_path() . '/app/' . $class . '.php')) {
include $file;
}
});
$renderer = $this->getComponent('renderer');
event(new FormatterRenderer($renderer, $post));