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


PHP SMWExporter::m_ent_category方法代码示例

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


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

示例1: 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();
 }
开发者ID:WolfgangFahl,项目名称:SemanticMediaWiki,代码行数:28,代码来源:SMW_Exporter.php

示例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://)
     $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);
     }
 }
开发者ID:jongfeli,项目名称:SemanticMediaWiki,代码行数:36,代码来源:SMW_Exporter.php


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