HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/lib/SGL/Task/PhpToXmlSerializer.php
<?php
/**
 * Serializes PHP to XML.
 *
 * @package Task
 * @author  Demian Turner <demian@phpkitchen.com>
 */
require_once 'XML/Serializer.php';

/**
 * Serializes returned PHP objects into XML for requests.
 *
 */
class SGL_Task_PhpToXmlSerializer extends SGL_DecorateProcess
{
    public function process(&$input, &$output)
    {
        SGL::logMessage(null, PEAR_LOG_DEBUG);

        $this->processRequest->process($input, $output);

        $options = array(
            'encoding'       => 'UTF-8',
            "indent"         => "    ",
            "linebreak"      => "\n",
            "classAsTagName" => true,
            "addDecl" => true,
        );

        $serializer = new XML_Serializer($options);
         ///fix PHP 5.3
        $serializer = &$serializer;
        $result = $serializer->serialize($input->result);
        if ($result === true ) {
            $xml = $serializer->getSerializedData();
            $output->data = $xml;
        }
    }
}
?>