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

Public Member Functions

 __construct (GetItemDescriptionWithFallback $useCase, MiddlewareHandler $middlewareHandler, ResponseFactory $responseFactory)
 
 needsWriteAccess ()
 
 run (... $args)
 
 runUseCase (string $itemId, string $languageCode)
 
 getParamSettings ()
 
 checkPreconditions ()
 Preconditions are checked via PreconditionMiddleware.
 

Static Public Member Functions

static factory ()
 

Private Member Functions

 newSuccessHttpResponse (GetItemDescriptionWithFallbackResponse $useCaseResponse)
 
 newLanguageFallbackResponse (string $itemId, string $fallbackLanguageCode)
 
 newRedirectHttpResponse (ItemRedirect $e, string $languageCode)
 
 setEtagFromRevId (Response $response, int $revId)
 

Private Attributes

const ITEM_ID_PATH_PARAM = 'item_id'
 
const LANGUAGE_CODE_PATH_PARAM = 'language_code'
 
GetItemDescriptionWithFallback $useCase
 
MiddlewareHandler $middlewareHandler
 
ResponseFactory $responseFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::__construct ( GetItemDescriptionWithFallback $useCase,
MiddlewareHandler $middlewareHandler,
ResponseFactory $responseFactory )

Member Function Documentation

◆ checkPreconditions()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::checkPreconditions ( )

Preconditions are checked via PreconditionMiddleware.

◆ factory()

static Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::factory ( )
static

◆ getParamSettings()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::getParamSettings ( )

◆ needsWriteAccess()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::needsWriteAccess ( )

◆ newLanguageFallbackResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::newLanguageFallbackResponse ( string $itemId,
string $fallbackLanguageCode )
private

◆ newRedirectHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::newRedirectHttpResponse ( ItemRedirect $e,
string $languageCode )
private

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::newSuccessHttpResponse ( GetItemDescriptionWithFallbackResponse $useCaseResponse)
private

◆ run()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::run ( $args)
Parameters
mixed...$args

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::runUseCase ( string $itemId,
string $languageCode )

◆ setEtagFromRevId()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::setEtagFromRevId ( Response $response,
int $revId )
private

Member Data Documentation

◆ $middlewareHandler

MiddlewareHandler Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::$middlewareHandler
private

◆ $responseFactory

ResponseFactory Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::$responseFactory
private

◆ $useCase

GetItemDescriptionWithFallback Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::$useCase
private

◆ ITEM_ID_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::ITEM_ID_PATH_PARAM = 'item_id'
private

◆ LANGUAGE_CODE_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionWithFallbackRouteHandler::LANGUAGE_CODE_PATH_PARAM = 'language_code'
private

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