mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +02:00
* Fix dependency version constraint. (Reverts #1066.) * Allow exceptions to be raised when dispatching middleware. * Fix our error handler middleware (do not implement Stratigility's error handler interface, catch exceptions instead). See https://docs.zendframework.com/zend-stratigility/migration/to-v2/. Closes #1069.
38 lines
860 B
PHP
38 lines
860 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 Flarum\Admin\Server as AdminServer;
|
|
use Flarum\Api\Server as ApiServer;
|
|
use Flarum\Forum\Server as ForumServer;
|
|
use Flarum\Foundation\Application;
|
|
use Zend\Stratigility\MiddlewarePipe;
|
|
|
|
class FullStackServer extends AbstractServer
|
|
{
|
|
/**
|
|
* @param Application $app
|
|
* @return \Zend\Stratigility\MiddlewareInterface
|
|
*/
|
|
protected function getMiddleware(Application $app)
|
|
{
|
|
$pipe = new MiddlewarePipe;
|
|
$pipe->raiseThrowables();
|
|
|
|
$pipe->pipe(new ApiServer);
|
|
$pipe->pipe(new AdminServer);
|
|
$pipe->pipe(new ForumServer);
|
|
|
|
return $pipe;
|
|
}
|
|
}
|