mirror of
https://github.com/flarum/core.git
synced 2025-10-29 06:26:17 +01:00
29 lines
605 B
PHP
29 lines
605 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* (c) Toby Zerner <toby.zerner@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\Bus;
|
|
|
|
use Illuminate\Bus\Dispatcher as BaseDispatcher;
|
|
|
|
class Dispatcher extends BaseDispatcher
|
|
{
|
|
public function getCommandHandler($command)
|
|
{
|
|
$handler = get_class($command).'Handler';
|
|
|
|
if (class_exists($handler)) {
|
|
return $this->container->make($handler);
|
|
}
|
|
|
|
return parent::getCommandHandler($command);
|
|
}
|
|
}
|