1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 10:16:09 +02:00

Remove deprecated ConfigureMiddleware Event (#2032)

This commit is contained in:
Franz Liedke
2020-03-04 23:02:05 +01:00
committed by GitHub
parent ec3e9c722b
commit 84ae88794f
4 changed files with 0 additions and 67 deletions

View File

@@ -1,58 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Event;
use Laminas\Stratigility\MiddlewarePipe;
/**
* @deprecated
*/
class ConfigureMiddleware
{
/**
* @var MiddlewarePipe
*/
public $pipe;
/**
* @var string
*/
public $stackName;
/**
* @param MiddlewarePipe $pipe
* @param string $stackName
*/
public function __construct(MiddlewarePipe $pipe, $stackName)
{
$this->pipe = $pipe;
$this->stackName = $stackName;
}
public function pipe($middleware)
{
$this->pipe->pipe($middleware);
}
public function isForum()
{
return $this->stackName === 'forum';
}
public function isAdmin()
{
return $this->stackName === 'admin';
}
public function isApi()
{
return $this->stackName === 'api';
}
}