mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
issue 2662 display coding convention
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12217 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d77d426c4f
commit
1b2d64a4d7
6 changed files with 381 additions and 321 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
class XMLDisplayHandler {
|
||||
class XMLDisplayHandler
|
||||
{
|
||||
/**
|
||||
* Produce XML compliant content given a module object.\n
|
||||
* @param ModuleObject $oModule the module object
|
||||
* @return string
|
||||
**/
|
||||
*/
|
||||
function toDoc(&$oModule)
|
||||
{
|
||||
$variables = $oModule->getVariables();
|
||||
|
|
@ -25,13 +25,14 @@ class XMLDisplayHandler {
|
|||
* produce XML code given variable object\n
|
||||
* @param object $obj
|
||||
* @return string
|
||||
**/
|
||||
*/
|
||||
function _makeXmlDoc($obj) {
|
||||
if(!count($obj)) return;
|
||||
|
||||
$xmlDoc = '';
|
||||
|
||||
foreach($obj as $key => $val) {
|
||||
foreach($obj as $key => $val)
|
||||
{
|
||||
if(is_numeric($key)) $key = 'item';
|
||||
|
||||
if(is_string($val)) $xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key,"\n");
|
||||
|
|
@ -42,5 +43,5 @@ class XMLDisplayHandler {
|
|||
return $xmlDoc;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
/* End of file XMLDisplayHandler.class.php */
|
||||
/* Location: ./classes/display/XMLDisplayHandler.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue