aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/api.php77
1 files changed, 0 insertions, 77 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php
index 9e2ec6301..d04a7029b 100644
--- a/engine/lib/api.php
+++ b/engine/lib/api.php
@@ -736,83 +736,6 @@
return false;
}
- // XML functions //////////////////////////////////////////////////////////////////////////
-
- /**
- * This function serialises an object recursively into an XML representation.
- * @param $data object The object to serialise.
- * @param $n int Level, only used for recursion.
- * @return string The serialised XML output.
- */
- function serialise_object_to_xml($data, $name = "", $n = 0)
- {
- $classname = ($name=="" ? get_class($data) : $name);
-
- $vars = get_object_vars($data);
-
- $output = "";
-
- if ($n==0) $output = "<$classname>";
-
- foreach ($vars as $key => $value)
- {
- $output .= "<$key type=\"".gettype($value)."\">";
-
- if (is_object($value))
- $output .= serialise_object_to_xml($value, $key, $n+1);
- else if (is_array($value))
- $output .= serialise_array_to_xml($value, $n+1);
- else
- $output .= htmlentities($value);
-
- $output .= "</$key>\n";
- }
-
- if ($n==0) $output .= "</$classname>\n";
-
- return $output;
- }
-
- /**
- * Serialise an array.
- *
- * @param array $data
- * @param int $n Used for recursion
- * @return string
- */
- function serialise_array_to_xml(array $data, $n = 0)
- {
- $output = "";
-
- if ($n==0) $output = "<array>\n";
-
- foreach ($data as $key => $value)
- {
- $item = "array_item";
-
- if (is_numeric($key))
- $output .= "<$item name=\"$key\" type=\"".gettype($value)."\">";
- else
- {
- $item = $key;
- $output .= "<$item type=\"".gettype($value)."\">";
- }
-
- if (is_object($value))
- $output .= serialise_object_to_xml($value, $item, $n+1);
- else if (is_array($value))
- $output .= serialise_array_to_xml($value, $n+1);
- else
- $output .= htmlentities($value);
-
- $output .= "</$item>\n";
- }
-
- if ($n==0) $output = "</array>\n";
-
- return $output;
- }
-
// Output functions ///////////////////////////////////////////////////////////////////////
$API_OUTPUT_FUNCTIONS = array();