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

Public Member Functions

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

Static Public Member Functions

static factory ()
 

Private Member Functions

 setEtagFromRevId (Response $response, int $revId)
 
 newSuccessHttpResponse (GetSitelinkResponse $useCaseResponse)
 
 newRedirectHttpResponse (ItemRedirect $redirect, string $siteId)
 

Private Attributes

const ITEM_ID_PATH_PARAM = 'item_id'
 
const SITE_ID_PATH_PARAM = 'site_id'
 
GetSitelink $useCase
 
SitelinkSerializer $sitelinkSerializer
 
MiddlewareHandler $middlewareHandler
 
ResponseFactory $responseFactory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::__construct ( GetSitelink $useCase,
SitelinkSerializer $sitelinkSerializer,
MiddlewareHandler $middlewareHandler,
ResponseFactory $responseFactory )

Member Function Documentation

◆ checkPreconditions()

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

Preconditions are checked via PreconditionMiddleware.

◆ factory()

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

◆ getParamSettings()

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

◆ needsWriteAccess()

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

◆ newRedirectHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::newRedirectHttpResponse ( ItemRedirect $redirect,
string $siteId )
private

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::newSuccessHttpResponse ( GetSitelinkResponse $useCaseResponse)
private

◆ run()

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

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::runUseCase ( string $itemId,
string $siteId )

◆ setEtagFromRevId()

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

Member Data Documentation

◆ $middlewareHandler

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

◆ $responseFactory

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

◆ $sitelinkSerializer

SitelinkSerializer Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::$sitelinkSerializer
private

◆ $useCase

GetSitelink Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::$useCase
private

◆ ITEM_ID_PATH_PARAM

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

◆ SITE_ID_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\GetSitelinkRouteHandler::SITE_ID_PATH_PARAM = 'site_id'
private

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