mirror of
https://github.com/flarum/core.git
synced 2025-10-14 00:15:51 +02:00
40 lines
765 B
PHP
40 lines
765 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\Http;
|
|
|
|
use Illuminate\Contracts\Container\Container;
|
|
|
|
class RouteHandlerFactory
|
|
{
|
|
/**
|
|
* @var Container
|
|
*/
|
|
protected $container;
|
|
|
|
/**
|
|
* @param Container $container
|
|
*/
|
|
public function __construct(Container $container)
|
|
{
|
|
$this->container = $container;
|
|
}
|
|
|
|
/**
|
|
* @param string $controller
|
|
* @return ControllerRouteHandler
|
|
*/
|
|
public function toController($controller)
|
|
{
|
|
return new ControllerRouteHandler($this->container, $controller);
|
|
}
|
|
}
|