PERF: avoid reinstantiation of event subscribers

This commit is contained in:
Toby Zerner 2015-07-27 11:54:03 +09:30
parent e536ea5d0d
commit c5bb8bcf6c
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ class AddClientAssets
{
public function subscribe(Dispatcher $events)
{
$events->listen(RegisterLocales::class, __CLASS__.'@addLocale');
$events->listen(BuildClientView::class, __CLASS__.'@addAssets');
$events->listen(RegisterLocales::class, [$this, 'addLocale']);
$events->listen(BuildClientView::class, [$this, 'addAssets']);
}
public function addLocale(RegisterLocales $event)

View File

@ -7,7 +7,7 @@ class AddEmoticons
{
public function subscribe(Dispatcher $events)
{
$events->listen(FormatterConfigurator::class, __CLASS__.'@addEmoticons');
$events->listen(FormatterConfigurator::class, [$this, 'addEmoticons']);
}
public function addEmoticons(FormatterConfigurator $event)