本文整理汇总了PHP中Wikibase\Repo\WikibaseRepo::getDefaultSnakFormatterBuilders方法的典型用法代码示例。如果您正苦于以下问题:PHP WikibaseRepo::getDefaultSnakFormatterBuilders方法的具体用法?PHP WikibaseRepo::getDefaultSnakFormatterBuilders怎么用?PHP WikibaseRepo::getDefaultSnakFormatterBuilders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wikibase\Repo\WikibaseRepo
的用法示例。
在下文中一共展示了WikibaseRepo::getDefaultSnakFormatterBuilders方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: JulianDateTimeValueCleaner
$dateCleaner = new JulianDateTimeValueCleaner();
$complexValueHelper = $mode === 'simple' ? null : new ComplexValueRdfHelper($vocab, $writer->sub(), $dedupe);
return new TimeRdfBuilder($dateCleaner, $complexValueHelper);
}), 'PT:url' => array('validator-factory-callback' => function () {
$factory = WikibaseRepo::getDefaultValidatorBuilders();
return $factory->buildUrlValidators();
}, 'parser-factory-callback' => $newStringParser, 'formatter-factory-callback' => function ($format, FormatterOptions $options) {
$factory = WikibaseRepo::getDefaultValueFormatterBuilders();
return $factory->newUrlFormatter($format, $options);
}, 'rdf-builder-factory-callback' => function ($mode, RdfVocabulary $vocab, RdfWriter $writer, EntityMentionListener $tracker, DedupeBag $dedupe) {
return new ObjectUriRdfBuilder();
}), 'PT:external-id' => array('validator-factory-callback' => function () {
$factory = WikibaseRepo::getDefaultValidatorBuilders();
return $factory->buildStringValidators();
}, 'parser-factory-callback' => $newStringParser, 'snak-formatter-factory-callback' => function ($format, FormatterOptions $options) {
$factory = WikibaseRepo::getDefaultSnakFormatterBuilders();
return $factory->newExternalIdentifierFormatter($format, $options);
}), 'VT:wikibase-entityid' => array('validator-factory-callback' => function () {
$factory = WikibaseRepo::getDefaultValidatorBuilders();
return $factory->buildEntityValidators();
}, 'parser-factory-callback' => $newEntityIdParser, 'formatter-factory-callback' => function ($format, FormatterOptions $options) {
$factory = WikibaseRepo::getDefaultValueFormatterBuilders();
return $factory->newEntityIdFormatter($format, $options);
}, 'rdf-builder-factory-callback' => function ($mode, RdfVocabulary $vocab, RdfWriter $writer, EntityMentionListener $tracker, DedupeBag $dedupe) {
return new EntityIdRdfBuilder($vocab, $tracker);
}), 'PT:wikibase-item' => array('validator-factory-callback' => function () {
$factory = WikibaseRepo::getDefaultValidatorBuilders();
return $factory->buildItemValidators();
}), 'PT:wikibase-property' => array('validator-factory-callback' => function () {
$factory = WikibaseRepo::getDefaultValidatorBuilders();
return $factory->buildPropertyValidators();