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

Public Member Functions

 __construct (AddPropertyStatement $useCase, StatementSerializer $statementSerializer, ResponseFactory $responseFactory, MiddlewareHandler $middlewareHandler)
 
 checkPreconditions ()
 Preconditions are checked via PreconditionMiddleware.
 
 run (... $args)
 
 runUseCase (string $propertyId)
 
 getParamSettings ()
 
 getBodyValidator ( $contentType)
 

Static Public Member Functions

static factory ()
 

Public Attributes

const PROPERTY_ID_PATH_PARAM = 'property_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 (string $propertyId, AddPropertyStatementResponse $useCaseResponse)
 
 setLocationHeader (Response $httpResponse, string $propertyId, string $statementGuid)
 
 getUsername ()
 

Private Attributes

AddPropertyStatement $useCase
 
StatementSerializer $statementSerializer
 
ResponseFactory $responseFactory
 
MiddlewareHandler $middlewareHandler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::__construct ( AddPropertyStatement $useCase,
StatementSerializer $statementSerializer,
ResponseFactory $responseFactory,
MiddlewareHandler $middlewareHandler )

Member Function Documentation

◆ checkPreconditions()

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

Preconditions are checked via PreconditionMiddleware.

◆ factory()

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

◆ getBodyValidator()

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

◆ getParamSettings()

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

◆ getUsername()

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

◆ newSuccessHttpResponse()

Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::newSuccessHttpResponse ( string $propertyId,
AddPropertyStatementResponse $useCaseResponse )
private

◆ run()

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

◆ runUseCase()

Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::runUseCase ( string $propertyId)

◆ setLocationHeader()

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

Member Data Documentation

◆ $middlewareHandler

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

◆ $responseFactory

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

◆ $statementSerializer

StatementSerializer Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::$statementSerializer
private

◆ $useCase

AddPropertyStatement Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::$useCase
private

◆ BOT_BODY_PARAM

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

◆ COMMENT_BODY_PARAM

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

◆ PROPERTY_ID_PATH_PARAM

const Wikibase\Repo\RestApi\RouteHandlers\AddPropertyStatementRouteHandler::PROPERTY_ID_PATH_PARAM = 'property_id'

◆ STATEMENT_BODY_PARAM

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

◆ TAGS_BODY_PARAM

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

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