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:
@@ -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)
|
||||
);
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user