Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler Class Reference
+ Inheritance diagram for Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler:
+ Collaboration diagram for Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler:

Public Member Functions

 __construct (AddItemStatement $addItemStatement, StatementJsonPresenter $successPresenter, ResponseFactory $responseFactory, MiddlewareHandler $middlewareHandler)
 
 run (... $args)
 
 runUseCase (string $itemId)
 
 getParamSettings ()
 
 getBodyValidator ( $contentType)
 

Static Public Member Functions

static factory ()
 

Public Attributes

const ITEM_ID_PATH_PARAM = 'item_id'
 
const STATEMENT_BODY_PARAM = 'statement'
 
const TAGS_BODY_PARAM = 'tags'
 
const BOT_BODY_PARAM = 'bot'
 
const COMMENT_BODY_PARAM = 'comment'
 

Private Member Functions

 newSuccessHttpResponse (AddItemStatementSuccessResponse $useCaseResponse, string $itemId)
 
 setEtagFromRevId (Response $httpResponse, int $revId)
 
 setLocationHeader (Response $httpResponse, string $itemId, string $statementGuid)
 
 getUsername ()
 

Private Attributes

 $addItemStatement
 
 $successPresenter
 
 $responseFactory
 
 $middlewareHandler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::__construct ( AddItemStatement  $addItemStatement,
StatementJsonPresenter  $successPresenter,
ResponseFactory  $responseFactory,
MiddlewareHandler  $middlewareHandler 
)

Member Function Documentation

◆ factory()

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

◆ getBodyValidator()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::getBodyValidator (   $contentType)

◆ getParamSettings()

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

◆ getUsername()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::getUsername ( )
private

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::newSuccessHttpResponse ( AddItemStatementSuccessResponse  $useCaseResponse,
string  $itemId 
)
private

◆ run()

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

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::runUseCase ( string  $itemId)
Exceptions

◆ setEtagFromRevId()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::setEtagFromRevId ( Response  $httpResponse,
int  $revId 
)
private

◆ setLocationHeader()

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::setLocationHeader ( Response  $httpResponse,
string  $itemId,
string  $statementGuid 
)
private

Member Data Documentation

◆ $addItemStatement

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$addItemStatement
private

◆ $middlewareHandler

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$middlewareHandler
private

◆ $responseFactory

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$responseFactory
private

◆ $successPresenter

Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::$successPresenter
private

◆ BOT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::BOT_BODY_PARAM = 'bot'

◆ COMMENT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::COMMENT_BODY_PARAM = 'comment'

◆ ITEM_ID_PATH_PARAM

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

◆ STATEMENT_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::STATEMENT_BODY_PARAM = 'statement'

◆ TAGS_BODY_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddItemStatementRouteHandler::TAGS_BODY_PARAM = 'tags'

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