mirror of
https://github.com/flarum/core.git
synced 2025-10-13 16:05:05 +02:00
- 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.
22 lines
477 B
PHP
22 lines
477 B
PHP
<?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);
|
|
}
|
|
}
|