当前位置: 首页>>代码示例>>PHP>>正文


PHP ApplicationFactory::newMwCollaboratorFactory方法代码示例

本文整理汇总了PHP中SMW\ApplicationFactory::newMwCollaboratorFactory方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationFactory::newMwCollaboratorFactory方法的具体用法?PHP ApplicationFactory::newMwCollaboratorFactory怎么用?PHP ApplicationFactory::newMwCollaboratorFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SMW\ApplicationFactory的用法示例。


在下文中一共展示了ApplicationFactory::newMwCollaboratorFactory方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: registerConnectionProviders

 private function registerConnectionProviders()
 {
     $mwCollaboratorFactory = $this->applicationFactory->newMwCollaboratorFactory();
     $connectionManager = new ConnectionManager();
     $connectionManager->registerConnectionProvider(DB_MASTER, $mwCollaboratorFactory->newLazyDBConnectionProvider(DB_MASTER));
     $connectionManager->registerConnectionProvider(DB_SLAVE, $mwCollaboratorFactory->newLazyDBConnectionProvider(DB_SLAVE));
     $connectionManager->registerConnectionProvider('mw.db', $mwCollaboratorFactory->newMediaWikiDatabaseConnectionProvider());
 }
开发者ID:hangya,项目名称:SemanticMediaWiki,代码行数:8,代码来源:Setup.php

示例2: performUpdate

 private function performUpdate()
 {
     $this->applicationFactory = ApplicationFactory::getInstance();
     $filePage = $this->makeFilePage();
     $parserData = $this->applicationFactory->newParserData($this->file->getTitle(), $filePage->getParserOutput($this->makeCanonicalParserOptions()));
     $pageInfoProvider = $this->applicationFactory->newMwCollaboratorFactory()->newPageInfoProvider($filePage);
     $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newPredefinedPropertyAnnotator($parserData->getSemanticData(), $pageInfoProvider);
     $propertyAnnotator->addAnnotation();
     $parserData->pushSemanticDataToParserOutput();
     $parserData->updateStore();
     return true;
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:12,代码来源:FileUpload.php

示例3: registerConnectionProviders

 private function registerConnectionProviders()
 {
     $mwCollaboratorFactory = $this->applicationFactory->newMwCollaboratorFactory();
     $connectionManager = new ConnectionManager();
     $connectionManager->registerConnectionProvider(DB_MASTER, $mwCollaboratorFactory->newLazyDBConnectionProvider(DB_MASTER));
     $connectionManager->registerConnectionProvider(DB_SLAVE, $mwCollaboratorFactory->newLazyDBConnectionProvider(DB_SLAVE));
     $connectionManager->registerConnectionProvider('mw.db', $mwCollaboratorFactory->newMediaWikiDatabaseConnectionProvider());
     // Connection can be used to redirect queries to another DB cluster
     $queryengineConnectionProvider = $mwCollaboratorFactory->newMediaWikiDatabaseConnectionProvider();
     $queryengineConnectionProvider->resetTransactionProfiler();
     $connectionManager->registerConnectionProvider('mw.db.queryengine', $queryengineConnectionProvider);
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:12,代码来源:Setup.php

示例4: matchWikiPageLastModifiedToRevisionLastModified

 private function matchWikiPageLastModifiedToRevisionLastModified($title)
 {
     if ($this->getParameter('pm') !== ($this->getParameter('pm') | SMW_UJ_PM_CLASTMDATE)) {
         return false;
     }
     $lastModified = $this->getWikiPageLastModifiedTimestamp(DIWikiPage::newFromTitle($title));
     if ($lastModified === \WikiPage::factory($title)->getTimestamp()) {
         $pageUpdater = $this->applicationFactory->newMwCollaboratorFactory()->newPageUpdater();
         $pageUpdater->addPage($title);
         $pageUpdater->doPurgeParserCache();
         return true;
     }
     return false;
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:14,代码来源:UpdateJob.php

示例5: run

 /**
  * @see Job::run
  *
  * @since  2.3
  */
 public function run()
 {
     $this->pageUpdater = $this->applicationFactory->newMwCollaboratorFactory()->newPageUpdater();
     $this->store = $this->applicationFactory->getStore();
     if ($this->hasParameter('limit')) {
         $this->limit = $this->getParameter('limit');
     }
     if ($this->hasParameter('offset')) {
         $this->offset = $this->getParameter('offset');
     }
     if ($this->hasParameter('idlist')) {
         $this->findEmbeddedQueryTargetLinksBatches($this->getParameter('idlist'));
     }
     $this->pageUpdater->addPage($this->getTitle());
     $this->pageUpdater->doPurgeParserCache();
     Hooks::run('SMW::Job::AfterParserCachePurgeComplete', array($this));
     return true;
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:23,代码来源:ParserCachePurgeJob.php

示例6: updateSemanticData

 private function updateSemanticData(Title $title, WikiPage $wikiPage, $revision)
 {
     $this->processSemantics = $revision !== null && $this->isSemanticEnabledNamespace($title);
     if (!$this->processSemantics) {
         return $this->semanticData = new SemanticData($this->getSubject());
     }
     $pageInfoProvider = $this->applicationFactory->newMwCollaboratorFactory()->newPageInfoProvider($wikiPage, $revision, User::newFromId($revision->getUser()));
     $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newPredefinedPropertyAnnotator($this->semanticData, $pageInfoProvider);
     $propertyAnnotator->addAnnotation();
 }
开发者ID:ReachingOut,项目名称:SemanticMediaWiki,代码行数:10,代码来源:StoreUpdater.php

示例7: createTable

 /**
  * Returns a formatted factbox table
  *
  * @since 1.9
  *
  * @param SMWSemanticData $semanticData
  *
  * @return string|null
  */
 protected function createTable(SemanticData $semanticData)
 {
     $this->htmlTableRenderer = $this->applicationFactory->newMwCollaboratorFactory()->newHtmlTableRenderer();
     $text = '';
     // Hook deprecated with SMW 1.9 and will vanish with SMW 1.11
     wfRunHooks('smwShowFactbox', array(&$text, $semanticData));
     // Hook since 1.9
     if (wfRunHooks('SMW::Factbox::BeforeContentGeneration', array(&$text, $semanticData))) {
         $this->getTableHeader($semanticData->getSubject());
         $this->getTableContent($semanticData);
         $text .= Html::rawElement('div', array('class' => 'smwfact'), $this->htmlTableRenderer->getHeaderItems() . $this->htmlTableRenderer->getHtml(array('class' => 'smwfacttable')));
     }
     return $text;
 }
开发者ID:WolfgangFahl,项目名称:SemanticMediaWiki,代码行数:23,代码来源:Factbox.php


注:本文中的SMW\ApplicationFactory::newMwCollaboratorFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。