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


PHP JoomlapackModelRegistry::getRawRegistryArray方法代码示例

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


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

示例1: jpimport

 /**
  * Returns an XML file with current profile's settings (configuration + filter options) 
  *
  * @return string The XML export data
  */
 function &export()
 {
     static $_xml;
     // Static variable holding export data
     if (!$_xml) {
         // Load JoomlaPack registry class and get a copy of the DBO
         jpimport('models.registry', true);
         $registry = new JoomlapackModelRegistry(array('id' => $this->_id));
         $db =& JFactory::getDBO();
         // Create XML header and dump configuration
         if (!defined('JPCR')) {
             define('JPCR', "\n");
         }
         $_xml = '<?xml version="1.0" encoding="utf-8"?>' . JPCR;
         $_xml .= '<jpexport version="1.3">' . JPCR;
         $_xml .= "\t" . '<config>' . JPCR;
         $reg =& $registry->getRawRegistryArray();
         foreach ($reg as $key => $value) {
             $_xml .= "\t\t<{$key}><![CDATA[" . serialize($value) . "]]></{$key}>\n";
         }
         $_xml .= "\t" . '</config>' . JPCR;
         // Dump inclusion filters
         $_xml .= "\t" . '<inclusion>' . JPCR;
         $sql = 'SELECT * FROM #__jp_inclusion WHERE ' . $db->nameQuote('profile') . ' = ' . $db->Quote($this->_id);
         $db->setQuery($sql);
         $data = $db->loadAssocList();
         foreach ($data as $entry) {
             $_xml .= "\t\t<entry><![CDATA[" . serialize($entry) . "]]></entry>\n";
         }
         $_xml .= "\t" . '</inclusion>' . JPCR;
         // Dump exclusion filters
         $_xml .= "\t" . '<exclusion>' . JPCR;
         $sql = 'SELECT * FROM #__jp_exclusion WHERE ' . $db->nameQuote('profile') . ' = ' . $db->Quote($this->_id);
         $db->setQuery($sql);
         $data = $db->loadAssocList();
         foreach ($data as $entry) {
             $_xml .= "\t\t<entry><![CDATA[" . serialize($entry) . "]]></entry>\n";
         }
         $_xml .= "\t" . '</exclusion>' . JPCR;
         // Finish up the document
         $_xml .= '</jpexport>' . JPCR;
     }
     return $_xml;
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:49,代码来源:profiles.php


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