mirror of
https://github.com/flarum/core.git
synced 2025-10-16 09:16:06 +02:00
Refactor Flarum\Web and Flarum\Admin
- In order to be consistent with the Ember/LESS naming scheme, renamed Flarum\Web to Flarum\Forum. - Moved common classes into Flarum\Support so that Flarum\Admin doesn’t depend on Flarum\Forum. Also moved Actor into Flarum\Support as it doesn’t belong in the domain.
This commit is contained in:
21
src/Support/Action.php
Normal file
21
src/Support/Action.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php namespace Flarum\Support;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
|
||||
abstract class Action
|
||||
{
|
||||
abstract public function handle(Request $request, $routeParams = []);
|
||||
|
||||
public function __construct(Actor $actor, Dispatcher $bus)
|
||||
{
|
||||
$this->actor = $actor;
|
||||
$this->bus = $bus;
|
||||
}
|
||||
|
||||
protected function callAction($class, $params = [])
|
||||
{
|
||||
$action = app($class);
|
||||
return $action->call($params);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user