1
0
mirror of https://github.com/flarum/core.git synced 2025-10-11 23:14:29 +02:00

fire -> dispatch

As per Illuminate\Contracts\Events\Dispatcher
This commit is contained in:
Toby Zerner
2018-02-10 12:09:35 +10:30
parent aff1b9a5e4
commit 160493e725
31 changed files with 42 additions and 42 deletions

View File

@@ -90,13 +90,13 @@ abstract class AbstractSerializeController implements ControllerInterface
{
$document = new Document;
static::$events->fire(
static::$events->dispatch(
new WillGetData($this)
);
$data = $this->data($request, $document);
static::$events->fire(
static::$events->dispatch(
new WillSerializeData($this, $data, $request, $document)
);

View File

@@ -53,11 +53,11 @@ class SetSettingsController implements ControllerInterface
$settings = $request->getParsedBody();
foreach ($settings as $k => $v) {
$this->dispatcher->fire(new Serializing($k, $v));
$this->dispatcher->dispatch(new Serializing($k, $v));
$this->settings->set($k, $v);
$this->dispatcher->fire(new Saved($k, $v));
$this->dispatcher->dispatch(new Saved($k, $v));
}
return new EmptyResponse(204);