BcRedirectMainSiteFilter
in package
implements
MiddlewareInterface
Uses
BcContainerTrait
Class BcRedirectMainSiteFilter
サブサイトにコンテンツが存在しない場合、同階層のメインサイトのコンテンツを確認し、 存在していれば、メインサイトへリダイレクトをする。
(例) /s/service → /service
Interfaces, Classes, Traits and Enums
- MiddlewareInterface
Table of Contents
- $priority : int
- priority
- getService() : array<string|int, mixed>|mixed|object
- Get Service
- hasService() : bool
- Has Service
- process() : ResponseInterface
- Process
- _existController() : bool
- コントローラーが存在するか確認
Properties
$priority
priority
public
int
$priority
= 10
URLの存在確認が完了しているタイミングを前提としている為、 Dispacher::parseParams() より後に実行される必要がある
Methods
getService()
Get Service
public
getService( $service) : array<string|int, mixed>|mixed|object
Parameters
Tags
Return values
array<string|int, mixed>|mixed|object —hasService()
Has Service
public
hasService( $service) : bool
Parameters
Tags
Return values
bool —process()
Process
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Return values
ResponseInterface —_existController()
コントローラーが存在するか確認
protected
_existController( $request) : bool