mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 10:23:16 +09:00
issue 2119. supporting php 5.4. widget and xml classes.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12697 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
285301a8c9
commit
ba9800ff34
37 changed files with 1187 additions and 473 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* XmlGenerator class
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
|
|
@ -7,6 +8,7 @@
|
|||
*/
|
||||
class XmlGenerator
|
||||
{
|
||||
|
||||
/**
|
||||
* object change to xml
|
||||
* @param object $xml
|
||||
|
|
@ -36,12 +38,11 @@ class XmlGenerator
|
|||
switch($key)
|
||||
{
|
||||
case 'node_name' : break;
|
||||
case 'attrs' :
|
||||
{
|
||||
case 'attrs' : {
|
||||
$attrs = '';
|
||||
if (isset($value))
|
||||
if(isset($value))
|
||||
{
|
||||
foreach($value as $attrName=>$attrValue)
|
||||
foreach($value as $attrName => $attrValue)
|
||||
{
|
||||
$attrs .= sprintf(' %s="%s"', $attrName, htmlspecialchars($attrValue));
|
||||
}
|
||||
|
|
@ -51,9 +52,8 @@ class XmlGenerator
|
|||
case 'body' :
|
||||
$body = $value;
|
||||
break;
|
||||
default :
|
||||
{
|
||||
if (is_array($value))
|
||||
default : {
|
||||
if(is_array($value))
|
||||
{
|
||||
foreach($value as $idx => $arrNode)
|
||||
{
|
||||
|
|
@ -67,8 +67,9 @@ class XmlGenerator
|
|||
}
|
||||
}
|
||||
}
|
||||
return sprintf('<%s%s>%s</%s>'."\n", $node->node_name, $attrs, $body, $node->node_name);
|
||||
return sprintf('<%s%s>%s</%s>' . "\n", $node->node_name, $attrs, $body, $node->node_name);
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file XmlGenerator.class.php */
|
||||
/* Location: ./classes/xml/XmlGenerator.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue