本文整理汇总了PHP中SMWExporter::m_ent_wiki方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWExporter::m_ent_wiki方法的具体用法?PHP SMWExporter::m_ent_wiki怎么用?PHP SMWExporter::m_ent_wiki使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMWExporter
的用法示例。
在下文中一共展示了SMWExporter::m_ent_wiki方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initBaseURIs
/**
* Make sure that necessary base URIs are initialised properly.
*/
static public function initBaseURIs() {
if ( self::$m_exporturl !== false ) return;
global $wgContLang, $wgServer, $wgArticlePath;
global $smwgNamespace; // complete namespace for URIs (with protocol, usually http://)
if ( '' == $smwgNamespace ) {
$resolver = SpecialPage::getTitleFor( 'URIResolver' );
$smwgNamespace = $resolver->getFullURL() . '/';
} elseif ( $smwgNamespace[0] == '.' ) {
$resolver = SpecialPage::getTitleFor( 'URIResolver' );
$smwgNamespace = "http://" . substr( $smwgNamespace, 1 ) . $resolver->getLocalURL() . '/';
}
// The article name must be the last part of wiki URLs for proper OWL/RDF export:
self::$m_ent_wikiurl = $wgServer . str_replace( '$1', '', $wgArticlePath );
self::$m_ent_wiki = $smwgNamespace;
self::$m_ent_property = self::$m_ent_wiki . self::encodeURI( urlencode( str_replace( ' ', '_', $wgContLang->getNsText( SMW_NS_PROPERTY ) . ':' ) ) );
$title = SpecialPage::getTitleFor( 'ExportRDF' );
self::$m_exporturl = self::$m_ent_wikiurl . $title->getPrefixedURL();
}
示例2: initBaseURIs
/**
* Make sure that necessary base URIs are initialised properly.
*/
public static function initBaseURIs()
{
if (self::$m_exporturl !== false) {
return;
}
global $wgContLang, $wgServer, $wgArticlePath;
global $smwgNamespace;
// complete namespace for URIs (with protocol, usually http://)
if ('' == $smwgNamespace) {
$resolver = SpecialPage::getTitleFor('URIResolver');
$smwgNamespace = $resolver->getFullURL() . '/';
} elseif ($smwgNamespace[0] == '.') {
$resolver = SpecialPage::getTitleFor('URIResolver');
$smwgNamespace = "http://" . substr($smwgNamespace, 1) . $resolver->getLocalURL() . '/';
}
// The article name must be the last part of wiki URLs for proper OWL/RDF export:
self::$m_ent_wikiurl = $wgServer . str_replace('$1', '', $wgArticlePath);
self::$m_ent_wiki = $smwgNamespace;
$property = $GLOBALS['smwgExportBCNonCanonicalFormUse'] ? urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_PROPERTY))) : 'Property';
$category = $GLOBALS['smwgExportBCNonCanonicalFormUse'] ? urlencode(str_replace(' ', '_', $wgContLang->getNsText(NS_CATEGORY))) : 'Category';
self::$m_ent_property = self::$m_ent_wiki . Escaper::encodeUri($property . ':');
self::$m_ent_category = self::$m_ent_wiki . Escaper::encodeUri($category . ':');
$title = SpecialPage::getTitleFor('ExportRDF');
self::$m_exporturl = self::$m_ent_wikiurl . $title->getPrefixedURL();
}
示例3: initBaseURIs
/**
* Make sure that necessary base URIs are initialised properly.
*/
public static function initBaseURIs()
{
if (self::$m_exporturl !== false) {
return;
}
global $wgContLang, $wgServer, $wgArticlePath;
global $smwgNamespace;
// complete namespace for URIs (with protocol, usually http://)
$resolver = Title::makeTitle(NS_SPECIAL, 'URIResolver');
if ('' == $smwgNamespace) {
$smwgNamespace = $resolver->getFullURL() . '/';
} elseif ($smwgNamespace[0] == '.') {
$smwgNamespace = "http://" . substr($smwgNamespace, 1) . $resolver->getLocalURL() . '/';
}
// The article name must be the last part of wiki URLs for proper OWL/RDF export:
self::$m_ent_wikiurl = $wgServer . str_replace('$1', '', $wgArticlePath);
self::$m_ent_wiki = $smwgNamespace;
$property = $GLOBALS['smwgExportBCNonCanonicalFormUse'] ? urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_PROPERTY))) : 'Property';
$category = $GLOBALS['smwgExportBCNonCanonicalFormUse'] ? urlencode(str_replace(' ', '_', $wgContLang->getNsText(NS_CATEGORY))) : 'Category';
self::$m_ent_property = self::$m_ent_wiki . Escaper::encodeUri($property . ':');
self::$m_ent_category = self::$m_ent_wiki . Escaper::encodeUri($category . ':');
$title = Title::makeTitle(NS_SPECIAL, 'ExportRDF');
self::$m_exporturl = self::$m_ent_wikiurl . $title->getPrefixedURL();
// Canonical form, the title object always contains a wgContLang reference
// therefore replace it
if (!$GLOBALS['smwgExportBCNonCanonicalFormUse']) {
$localizer = Localizer::getInstance();
self::$m_ent_property = $localizer->getCanonicalizedUrlByNamespace(NS_SPECIAL, self::$m_ent_property);
self::$m_ent_category = $localizer->getCanonicalizedUrlByNamespace(NS_SPECIAL, self::$m_ent_category);
self::$m_ent_wiki = $localizer->getCanonicalizedUrlByNamespace(NS_SPECIAL, self::$m_ent_wiki);
self::$m_exporturl = $localizer->getCanonicalizedUrlByNamespace(NS_SPECIAL, self::$m_exporturl);
}
}