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

Public Member Functions

 __construct (GetItemLabel $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 (GetItemLabelResponse $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'
 
GetItemLabel $useCase
 
MiddlewareHandler $middlewareHandler
 
ResponseFactory $responseFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ checkPreconditions()

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

Preconditions are checked via PreconditionMiddleware.

◆ factory()

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

◆ getParamSettings()

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

◆ needsWriteAccess()

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

◆ newRedirectHttpResponse()

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

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemLabelRouteHandler::newSuccessHttpResponse ( GetItemLabelResponse $useCaseResponse)
private

◆ run()

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

◆ runUseCase()

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

◆ setEtagFromRevId()

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

Member Data Documentation

◆ $middlewareHandler

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

◆ $responseFactory

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

◆ $useCase

GetItemLabel Wikibase\Repo\RestApi\RouteHandlers\GetItemLabelRouteHandler::$useCase
private

◆ ITEM_ID_PATH_PARAM

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

◆ LANGUAGE_CODE_PATH_PARAM

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

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