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

Public Member Functions

 __construct (GetItemDescription $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 (GetItemDescriptionResponse $useCaseResponse)
 
 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'
 
GetItemDescription $useCase
 
MiddlewareHandler $middlewareHandler
 
ResponseFactory $responseFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ checkPreconditions()

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

Preconditions are checked via PreconditionMiddleware.

◆ factory()

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

◆ getParamSettings()

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

◆ needsWriteAccess()

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

◆ newRedirectHttpResponse()

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

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionRouteHandler::newSuccessHttpResponse ( GetItemDescriptionResponse  $useCaseResponse)
private

◆ run()

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

◆ runUseCase()

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

◆ setEtagFromRevId()

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

Member Data Documentation

◆ $middlewareHandler

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

◆ $responseFactory

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

◆ $useCase

GetItemDescription Wikibase\Repo\RestApi\RouteHandlers\GetItemDescriptionRouteHandler::$useCase
private

◆ ITEM_ID_PATH_PARAM

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

◆ LANGUAGE_CODE_PATH_PARAM

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

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