Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\ApplicationFactory Class Reference

Public Member Functions

 __construct (ContainerBuilder $containerBuilder=null, $servicesFileDir= '')
 
 registerObject ($objectName, $objectSignature)
 
 registerFromFile ($file)
 
 singleton ($serviceName)
 
 create ($serviceName)
 
 newSerializerFactory ()
 
 newJobFactory ()
 
 newParserFunctionFactory (Parser $parser)
 
 newMaintenanceFactory ()
 
 newCacheFactory ()
 
 getCacheFactory ()
 
 getQuerySourceFactory ($source=null)
 
 getStore ($store=null)
 
 getSettings ()
 
 newTitleCreator ()
 
 newPageCreator ()
 
 newPageUpdater ()
 
 getIteratorFactory ()
 
 getDataValueFactory ()
 
 getCache ($cacheType=null)
 
 newInTextAnnotationParser (ParserData $parserData)
 
 newParserData (Title $title, ParserOutput $parserOutput)
 
 newContentParser (Title $title)
 
 newStoreUpdater (SemanticData $semanticData)
 
 newMwCollaboratorFactory ()
 
 getNamespaceExaminer ()
 
 getPropertySpecificationLookup ()
 
 newPropertyHierarchyLookup ()
 
 getPropertyLabelFinder ()
 
 getCachedPropertyValuesPrefetcher ()
 
 getMediaWikiNsContentReader ()
 
 getInMemoryPoolCache ()
 
 getLoadBalancer ()
 
 newDeferredCallableUpdate (Closure $callback=null)
 
 newTransactionalDeferredCallableUpdate (Closure $callback=null)
 
 newQueryParser ()
 
 getDataItemFactory ()
 
 getQueryFactory ()
 
 getMediaWikiLogger ()
 

Static Public Member Functions

static getInstance ()
 
static clear ()
 

Detailed Description

Application instances access for internal and external use

GNU GPL v2+

Since
2.0
Author
mwjames

Constructor & Destructor Documentation

SMW\ApplicationFactory::__construct ( ContainerBuilder  $containerBuilder = null,
  $servicesFileDir = '' 
)
Since
2.0
Parameters
ContainerBuilder | null$containerBuilder
string$servicesFileDir

Member Function Documentation

static SMW\ApplicationFactory::clear ( )
static
Since
2.0
SMW\ApplicationFactory::create (   $serviceName)
Note
Services called via this function are for internal use only and not to be relied upon for external access.
Since
2.5
Parameters
string$serviceName
Returns
mixed
SMW\ApplicationFactory::getCache (   $cacheType = null)
Since
2.0
Returns
Cache
SMW\ApplicationFactory::getCachedPropertyValuesPrefetcher ( )
SMW\ApplicationFactory::getCacheFactory ( )
Since
2.2
Returns
CacheFactory
SMW\ApplicationFactory::getDataItemFactory ( )
Since
2.5
Returns
DataItemFactory
SMW\ApplicationFactory::getDataValueFactory ( )
Since
2.5
Returns
DataValueFactory
SMW\ApplicationFactory::getInMemoryPoolCache ( )
Since
2.4
Returns
InMemoryPoolCache
static SMW\ApplicationFactory::getInstance ( )
static

This method returns the global instance of the application factory.

Reliance on global state is needed at entry points into SMW such as hook handlers, special pages and jobs, since there we tend to not have control over the object lifecycle. Pragmatically we might also want to use this when refactoring legacy code that already has the global state dependency. For new code very special justification is required to rely on global state.

Since
2.0
Returns
self
SMW\ApplicationFactory::getIteratorFactory ( )
Since
2.5
Returns
IteratorFactory
SMW\ApplicationFactory::getLoadBalancer ( )
Since
2.5
Returns
SMW\ApplicationFactory::getMediaWikiLogger ( )
Since
2.5
Returns
LoggerInterface
SMW\ApplicationFactory::getMediaWikiNsContentReader ( )
Since
2.4
Returns
MediaWikiNsContentReader
SMW\ApplicationFactory::getNamespaceExaminer ( )
Since
2.1
Returns
NamespaceExaminer
SMW\ApplicationFactory::getPropertyLabelFinder ( )
Since
2.5
Returns
PropertyLabelFinder
SMW\ApplicationFactory::getPropertySpecificationLookup ( )
Since
2.4
Returns
PropertySpecificationLookup
SMW\ApplicationFactory::getQueryFactory ( )
Since
2.5
Returns
QueryFactory
SMW\ApplicationFactory::getQuerySourceFactory (   $source = null)
Since
2.5
Parameters
string | null$source
Returns
QuerySourceFactory
SMW\ApplicationFactory::getSettings ( )
Since
2.0
Returns
Settings
SMW\ApplicationFactory::getStore (   $store = null)
Since
2.0
Returns
Store
SMW\ApplicationFactory::newCacheFactory ( )
Since
2.2
Returns
CacheFactory
SMW\ApplicationFactory::newContentParser ( Title  $title)
Since
2.0
Returns
ContentParser
SMW\ApplicationFactory::newDeferredCallableUpdate ( Closure  $callback = null)
Since
2.4
Parameters
Closure$callback
Returns
DeferredCallableUpdate
SMW\ApplicationFactory::newInTextAnnotationParser ( ParserData  $parserData)
Since
2.0
Returns
InTextAnnotationParser
SMW\ApplicationFactory::newJobFactory ( )
Since
2.0
Returns
JobFactory
SMW\ApplicationFactory::newMaintenanceFactory ( )
Since
2.2
Returns
MaintenanceFactory
SMW\ApplicationFactory::newMwCollaboratorFactory ( )
Since
2.1
Returns
MwCollaboratorFactory
SMW\ApplicationFactory::newPageCreator ( )
Since
2.0
Returns
PageCreator
SMW\ApplicationFactory::newPageUpdater ( )
Since
2.5
Returns
PageUpdater
SMW\ApplicationFactory::newParserData ( Title  $title,
ParserOutput  $parserOutput 
)
Since
2.0
Returns
ParserData
SMW\ApplicationFactory::newParserFunctionFactory ( Parser  $parser)
Since
2.1
Parameters
Parser$parser
Returns
ParserFunctionFactory
SMW\ApplicationFactory::newPropertyHierarchyLookup ( )
Since
2.4
Returns
PropertyHierarchyLookup
SMW\ApplicationFactory::newQueryParser ( )
Deprecated:
since 2.5, use QueryFactory::newQueryParser
Since
2.1
Returns
QueryParser
SMW\ApplicationFactory::newSerializerFactory ( )
Since
2.0
Returns
SerializerFactory
SMW\ApplicationFactory::newStoreUpdater ( SemanticData  $semanticData)
Since
2.1
Parameters
SemanticData$semanticData
Returns
StoreUpdater
SMW\ApplicationFactory::newTitleCreator ( )
Since
2.0
Returns
TitleCreator
SMW\ApplicationFactory::newTransactionalDeferredCallableUpdate ( Closure  $callback = null)
Since
3.0
Parameters
Closure$callback
Returns
TransactionalDeferredCallableUpdate
SMW\ApplicationFactory::registerFromFile (   $file)
Since
2.5
Parameters
string$file
SMW\ApplicationFactory::registerObject (   $objectName,
  $objectSignature 
)
Since
2.0
Parameters
string$objectName
callable | array$objectSignature
SMW\ApplicationFactory::singleton (   $serviceName)
Note
Services called via this function are for internal use only and not to be relied upon for external access.
Parameters
string$serviceName
Returns
mixed

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