本文整理汇总了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;
}