本文整理汇总了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);
}
示例2: tearDown
protected function tearDown()
{
ApplicationFactory::clear();
NamespaceExaminer::clear();
PropertyRegistry::clear();
Settings::clear();
Exporter::clear();
parent::tearDown();
}
示例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();
}
示例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();
}