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

Public Member Functions

 __construct (GetItem $getItem, ItemPartsSerializer $itemPartsSerializer, ResponseFactory $responseFactory, MiddlewareHandler $middlewareHandler)
 
 run (... $args)
 
 runUseCase (string $id)
 
 getParamSettings ()
 
 needsWriteAccess ()
 
 checkPreconditions ()
 Preconditions are checked via PreconditionMiddleware.
 

Static Public Member Functions

static factory ()
 

Public Attributes

const ROUTE = '/wikibase/v0/entities/items/{item_id}'
 
const ITEM_ID_PATH_PARAM = 'item_id'
 

Private Member Functions

 newSuccessHttpResponse (GetItemResponse $useCaseResponse)
 
 newRedirectHttpResponse (ItemRedirect $e)
 
 setEtagFromRevId (Response $response, int $revId)
 

Private Attributes

const FIELDS_QUERY_PARAM = '_fields'
 
GetItem $getItem
 
ItemPartsSerializer $itemPartsSerializer
 
ResponseFactory $responseFactory
 
MiddlewareHandler $middlewareHandler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::__construct ( GetItem $getItem,
ItemPartsSerializer $itemPartsSerializer,
ResponseFactory $responseFactory,
MiddlewareHandler $middlewareHandler )

Member Function Documentation

◆ checkPreconditions()

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

Preconditions are checked via PreconditionMiddleware.

◆ factory()

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

◆ getParamSettings()

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

◆ needsWriteAccess()

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

◆ newRedirectHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::newRedirectHttpResponse ( ItemRedirect $e)
private

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::newSuccessHttpResponse ( GetItemResponse $useCaseResponse)
private

◆ run()

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

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::runUseCase ( string $id)

◆ setEtagFromRevId()

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

Member Data Documentation

◆ $getItem

GetItem Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::$getItem
private

◆ $itemPartsSerializer

ItemPartsSerializer Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::$itemPartsSerializer
private

◆ $middlewareHandler

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

◆ $responseFactory

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

◆ FIELDS_QUERY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::FIELDS_QUERY_PARAM = '_fields'
private

◆ ITEM_ID_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::ITEM_ID_PATH_PARAM = 'item_id'

◆ ROUTE

const Wikibase\Repo\RestApi\RouteHandlers\GetItemRouteHandler::ROUTE = '/wikibase/v0/entities/items/{item_id}'

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