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


PHP SMWExporter::clear方法代码示例

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


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

示例1: testSortableDateQuery

 /**
  * #576
  */
 public function testSortableDateQuery()
 {
     $this->getStore()->updateData($this->fixturesProvider->getFactsheet('Berlin')->asEntity());
     // #576 introduced resource caching, therefore make sure that the
     // instance is cleared after data have been created before further
     // tests are carried out
     Exporter::clear();
     /**
      * @query {{#ask: [[Founded::SomeDistinctValue]] }}
      */
     $foundedValue = $this->fixturesProvider->getFactsheet('Berlin')->getFoundedValue();
     $description = new SomeProperty($foundedValue->getProperty(), new ValueDescription($foundedValue->getDataItem(), null, SMW_CMP_EQ));
     $propertyValue = new PropertyValue('__pro');
     $propertyValue->setDataItem($foundedValue->getProperty());
     $query = new Query($description, false, false);
     $query->querymode = Query::MODE_INSTANCES;
     $query->sortkeys = array($foundedValue->getProperty()->getLabel() => 'ASC');
     // Be aware of
     // Virtuoso 22023 Error SR353: Sorted TOP clause specifies more then
     // 10001 rows to sort. Only 10000 are allowed. Either decrease the
     // offset and/or row count or use a scrollable cursor
     $query->setLimit(100);
     $query->setExtraPrintouts(array(new PrintRequest(PrintRequest::PRINT_THIS, ''), new PrintRequest(PrintRequest::PRINT_PROP, null, $propertyValue)));
     $queryResult = $this->getStore()->getQueryResult($query);
     $this->queryResultValidator->assertThatQueryResultHasSubjects($this->fixturesProvider->getFactsheet('Berlin')->asSubject(), $queryResult);
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:29,代码来源:DatePropertyValueQueryDBIntegrationTest.php

示例2: tearDown

 protected function tearDown()
 {
     ApplicationFactory::clear();
     NamespaceExaminer::clear();
     PropertyRegistry::clear();
     Settings::clear();
     Exporter::clear();
     parent::tearDown();
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:9,代码来源:MwDBaseUnitTestCase.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     $utilityFactory = $this->testEnvironment->getUtilityFactory();
     $this->fixturesFileProvider = $utilityFactory->newFixturesFactory()->newFixturesFileProvider();
     $this->stringValidator = $utilityFactory->newValidatorFactory()->newStringValidator();
     $this->testEnvironment->withConfiguration(array('smwgPageSpecialProperties' => array('_MEDIA', '_MIME'), 'smwgNamespacesWithSemanticLinks' => array(NS_MAIN => true, NS_FILE => true), 'smwgCacheType' => 'hash', 'smwgExportBCAuxiliaryUse' => true));
     // Ensure that the DB creates the extra tables for MEDIA/MINE
     $this->getStore()->clear();
     $this->getStore()->setupStore(false);
     // MW GLOBALS to be restored after the test
     $this->testEnvironment->withConfiguration(array('wgEnableUploads' => true, 'wgFileExtensions' => array('txt'), 'wgVerifyMimeType' => true));
     \SMWExporter::clear();
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:14,代码来源:RdfFileResourceTest.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $utilityFactory = UtilityFactory::getInstance();
     $this->fixturesFileProvider = $utilityFactory->newFixturesFactory()->newFixturesFileProvider();
     $this->stringValidator = UtilityFactory::getInstance()->newValidatorFactory()->newStringValidator();
     $this->applicationFactory = ApplicationFactory::getInstance();
     $settings = array('smwgPageSpecialProperties' => array('_MEDIA', '_MIME'), 'smwgNamespacesWithSemanticLinks' => array(NS_MAIN => true, NS_FILE => true), 'smwgCacheType' => 'hash', 'smwgExportBCAuxiliaryUse' => true);
     foreach ($settings as $key => $value) {
         $this->applicationFactory->getSettings()->set($key, $value);
     }
     // Ensure that the DB creates the extra tables for MEDIA/MINE
     $this->getStore()->clear();
     $this->getStore()->setupStore(false);
     $this->wgEnableUploads = $GLOBALS['wgEnableUploads'];
     $this->wgFileExtensions = $GLOBALS['wgFileExtensions'];
     $this->wgVerifyMimeType = $GLOBALS['wgVerifyMimeType'];
     $GLOBALS['wgEnableUploads'] = true;
     $GLOBALS['wgFileExtensions'] = array('txt');
     $GLOBALS['wgVerifyMimeType'] = true;
     \SMWExporter::clear();
 }
开发者ID:WolfgangFahl,项目名称:SemanticMediaWiki,代码行数:22,代码来源:RdfFileResourceTest.php


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