Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Api\ApiHelperFactory Class Reference

A factory class for API helper objects. More...

Public Member Functions

 __construct (EntityTitleStoreLookup $entityTitleStoreLookup, ExceptionLocalizer $exceptionLocalizer, PropertyDataTypeLookup $dataTypeLookup, SiteLookup $siteLookup, SummaryFormatter $summaryFormatter, EntityRevisionLookup $entityRevisionLookup, MediawikiEditEntityFactory $editEntityFactory, SerializerFactory $serializerFactory, Serializer $entitySerializer, EntityIdParser $idParser, PermissionManager $permissionManager, RevisionLookup $revisionLookup, TitleFactory $titleFactory, EntityByLinkedTitleLookup $entityByLinkedTitleLookup=null, EntityFactory $entityFactory=null, EntityStore $entityStore=null)
 
 getResultBuilder (ApiBase $api)
 Returns a ResultBuilder wrapping the ApiResult of the given API module. More...
 
 getErrorReporter (ApiBase $api)
 Returns an ApiErrorReporter suitable for reporting errors from the given API module. More...
 
 getEntitySavingHelper (ApiBase $apiBase)
 Return an EntitySavingHelper object for use in Api modules. More...
 
 getEntityLoadingHelper (ApiBase $apiBase)
 Return an EntityLoadingHelper object for use in Api modules. More...
 

Private Attributes

 $entityTitleStoreLookup
 
 $exceptionLocalizer
 
 $dataTypeLookup
 
 $summaryFormatter
 
 $entityRevisionLookup
 
 $editEntityFactory
 
 $siteLookup
 
 $serializerFactory
 
 $entitySerializer
 
 $idParser
 
 $permissionManager
 
 $revisionLookup
 
 $titleFactory
 
 $entityByLinkedTitleLookup
 
 $entityFactory
 
 $entityStore
 

Detailed Description

A factory class for API helper objects.

Note
: This is a high level factory which should not be injected or passed around. It should only be used when bootstrapping from a static context.
Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\ApiHelperFactory::__construct ( EntityTitleStoreLookup  $entityTitleStoreLookup,
ExceptionLocalizer  $exceptionLocalizer,
PropertyDataTypeLookup  $dataTypeLookup,
SiteLookup  $siteLookup,
SummaryFormatter  $summaryFormatter,
EntityRevisionLookup  $entityRevisionLookup,
MediawikiEditEntityFactory  $editEntityFactory,
SerializerFactory  $serializerFactory,
Serializer  $entitySerializer,
EntityIdParser  $idParser,
PermissionManager  $permissionManager,
RevisionLookup  $revisionLookup,
TitleFactory  $titleFactory,
EntityByLinkedTitleLookup  $entityByLinkedTitleLookup = null,
EntityFactory  $entityFactory = null,
EntityStore  $entityStore = null 
)
Parameters
EntityTitleStoreLookup$entityTitleStoreLookup
ExceptionLocalizer$exceptionLocalizer
PropertyDataTypeLookup$dataTypeLookup
SiteLookup$siteLookup
SummaryFormatter$summaryFormatter
EntityRevisionLookup$entityRevisionLookup
MediawikiEditEntityFactory$editEntityFactory
SerializerFactory$serializerFactory
Serializer$entitySerializer
EntityIdParser$idParser
PermissionManager$permissionManager
RevisionLookup$revisionLookup

Member Function Documentation

◆ getEntityLoadingHelper()

Wikibase\Repo\Api\ApiHelperFactory::getEntityLoadingHelper ( ApiBase  $apiBase)

Return an EntityLoadingHelper object for use in Api modules.

Warning
The resulting EntityLoadingHelper may be stateful and should only be used for a single API request.
Parameters
ApiBase$apiBase
Returns
EntityLoadingHelper a new EntityLoadingHelper instance

◆ getEntitySavingHelper()

Wikibase\Repo\Api\ApiHelperFactory::getEntitySavingHelper ( ApiBase  $apiBase)

Return an EntitySavingHelper object for use in Api modules.

Warning
The resulting EntitySavingHelper may be stateful and should only be used for a single API request.
Parameters
ApiBase$apiBase
Returns
EntitySavingHelper a new EntitySavingHelper instance

◆ getErrorReporter()

Wikibase\Repo\Api\ApiHelperFactory::getErrorReporter ( ApiBase  $api)

Returns an ApiErrorReporter suitable for reporting errors from the given API module.

Parameters
ApiBase$api
Returns
ApiErrorReporter

◆ getResultBuilder()

Wikibase\Repo\Api\ApiHelperFactory::getResultBuilder ( ApiBase  $api)

Returns a ResultBuilder wrapping the ApiResult of the given API module.

Parameters
ApiBase$api
Returns
ResultBuilder

Member Data Documentation

◆ $dataTypeLookup

Wikibase\Repo\Api\ApiHelperFactory::$dataTypeLookup
private

◆ $editEntityFactory

Wikibase\Repo\Api\ApiHelperFactory::$editEntityFactory
private

◆ $entityByLinkedTitleLookup

Wikibase\Repo\Api\ApiHelperFactory::$entityByLinkedTitleLookup
private

◆ $entityFactory

Wikibase\Repo\Api\ApiHelperFactory::$entityFactory
private

◆ $entityRevisionLookup

Wikibase\Repo\Api\ApiHelperFactory::$entityRevisionLookup
private

◆ $entitySerializer

Wikibase\Repo\Api\ApiHelperFactory::$entitySerializer
private

◆ $entityStore

Wikibase\Repo\Api\ApiHelperFactory::$entityStore
private

◆ $entityTitleStoreLookup

Wikibase\Repo\Api\ApiHelperFactory::$entityTitleStoreLookup
private

◆ $exceptionLocalizer

Wikibase\Repo\Api\ApiHelperFactory::$exceptionLocalizer
private

◆ $idParser

Wikibase\Repo\Api\ApiHelperFactory::$idParser
private

◆ $permissionManager

Wikibase\Repo\Api\ApiHelperFactory::$permissionManager
private

◆ $revisionLookup

Wikibase\Repo\Api\ApiHelperFactory::$revisionLookup
private

◆ $serializerFactory

Wikibase\Repo\Api\ApiHelperFactory::$serializerFactory
private

◆ $siteLookup

Wikibase\Repo\Api\ApiHelperFactory::$siteLookup
private

◆ $summaryFormatter

Wikibase\Repo\Api\ApiHelperFactory::$summaryFormatter
private

◆ $titleFactory

Wikibase\Repo\Api\ApiHelperFactory::$titleFactory
private

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