Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware Class Reference
+ Inheritance diagram for Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware:
+ Collaboration diagram for Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware:

Public Member Functions

 __construct (array $allowedContentTypes)
 
 run (Handler $handler, callable $runNext)
 

Public Attributes

const TYPE_APPLICATION_JSON = 'application/json'
 
const TYPE_JSON_PATCH = 'application/json-patch+json'
 
const TYPE_NONE = ''
 

Private Member Functions

 getContentType (RequestInterface $request)
 

Private Attributes

array $allowedContentTypes
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::__construct ( array  $allowedContentTypes)

Member Function Documentation

◆ getContentType()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::getContentType ( RequestInterface  $request)
private

◆ run()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::run ( Handler  $handler,
callable  $runNext 
)

Member Data Documentation

◆ $allowedContentTypes

array Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::$allowedContentTypes
private

◆ TYPE_APPLICATION_JSON

const Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::TYPE_APPLICATION_JSON = 'application/json'

◆ TYPE_JSON_PATCH

const Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::TYPE_JSON_PATCH = 'application/json-patch+json'

◆ TYPE_NONE

const Wikibase\Repo\RestApi\RouteHandlers\Middleware\ContentTypeCheckMiddleware::TYPE_NONE = ''

The documentation for this class was generated from the following file: