CloneSet160


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29330.984class_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
129323
libraries/joomla/registry/registry.php
229363
libraries/joomla/registry/registry.php
329402
libraries/joomla/registry/registry.php
Clone Instance
1
Line Count
29
Source Line
323
Source File
libraries/joomla/registry/registry.php

        /**
         * Load an XML string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @access      public
         * @param       string  $data           XML formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the XML string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
        public

               function loadXML($data, $namespace=  NULL) {

                // Load a string into the given namespace [or default namespace if not given]
                $handler=  &JRegistryFormat::getInstance('XML');

                // If namespace is not set, get the default namespace
                if ($namespace == NULL) {
                        $namespace=  $this->_defaultNameSpace;
                      }

                if (! isset ($this->_registry[$namespace])) {
                        // If namespace does not exist, make it and load the data
                        $this->makeNameSpace($namespace);
                        $this->_registry[$namespace]['data']=  &$handler->stringToObject($data);
                      }
                else   {
                        // Get the data in object format
                        $ns=  &$handler->stringToObject($data);

                        /*
                         * We want to leave groups that are already in the namespace and add the
                         * groups loaded into the namespace.  This overwrites any existing group
                         * with the same name
                         */
                        foreach (get_object_vars($ns) as $k => $v) {
                                $this->_registry[$namespace]['data']->$k=  $v;
                              }
                      }
                return TRUE;
              }


Clone Instance
2
Line Count
29
Source Line
363
Source File
libraries/joomla/registry/registry.php

        /**
         * Load an INI string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @access      public
         * @param       string  $data           INI formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the INI string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
        public

               function loadINI($data, $namespace=  NULL) {

                // Load a string into the given namespace [or default namespace if not given]
                $handler=  &JRegistryFormat::getInstance('INI');

                // If namespace is not set, get the default namespace
                if ($namespace == NULL) {
                        $namespace=  $this->_defaultNameSpace;
                      }

                if (! isset ($this->_registry[$namespace])) {
                        // If namespace does not exist, make it and load the data
                        $this->makeNameSpace($namespace);
                        $this->_registry[$namespace]['data']=  &$handler->stringToObject($data);
                      }
                else   {
                        // Get the data in object format
                        $ns=  $handler->stringToObject($data);

                        /*
                         * We want to leave groups that are already in the namespace and add the
                         * groups loaded into the namespace.  This overwrites any existing group
                         * with the same name
                         */
                        foreach (get_object_vars($ns) as $k => $v) {
                                $this->_registry[$namespace]['data']->$k=  $v;
                              }
                      }
                return TRUE;
              }


Clone Instance
3
Line Count
29
Source Line
402
Source File
libraries/joomla/registry/registry.php

        /**
         * Load an JSON string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @param       string  $data           JSON formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the INI string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
        public

               function loadJSON($data, $namespace=  NULL) {

                // Load a string into the given namespace [or default namespace if not given]
                $handler=  &JRegistryFormat::getInstance('JSON');

                // If namespace is not set, get the default namespace
                if ($namespace == NULL) {
                        $namespace=  $this->_defaultNameSpace;
                      }

                if (! isset ($this->_registry[$namespace])) {
                        // If namespace does not exist, make it and load the data
                        $this->makeNameSpace($namespace);
                        $this->_registry[$namespace]['data']=  &$handler->stringToObject($data);
                      }
                else   {
                        // Get the data in object format
                        $ns=  $handler->stringToObject($data);

                        /*
                         * We want to leave groups that are already in the namespace and add the
                         * groups loaded into the namespace.  This overwrites any existing group
                         * with the same name
                         */
                        foreach (get_object_vars($ns) as $k => $v) {
                                $this->_registry[$namespace]['data']->$k=  $v;
                              }
                      }
                return TRUE;
              }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Load an XML string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @access      public
         * @param       string  $data           XML formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the XML string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
/**
         * Load an INI string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @access      public
         * @param       string  $data           INI formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the INI string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
/**
         * Load an JSON string into the registry into the given namespace [or default if a namespace is not given]
         *
         * @param       string  $data           JSON formatted string to load into the registry
         * @param       string  $namespace      Namespace to load the INI string into [optional]
         * @return      boolean True on success
         * @since       1.5
         */
public

      function [[#variable52500b20]]($data,$namespace=NULL) {
        // Load a string into the given namespace [or default namespace if not given]
        $handler= &JRegistryFormat::getInstance( [[#variable52500aa0]]);
        // If namespace is not set, get the default namespace
        if ($namespace == NULL) {
          $namespace=$this->_defaultNameSpace;
        }
        if (! isset ($this->_registry[$namespace])) {
          // If namespace does not exist, make it and load the data
          $this->makeNameSpace($namespace);
          $this->_registry[$namespace]['data']= &$handler->stringToObject($data);
        }
        else {
          // Get the data in object format
          $ns= [[#variable52500a80]]->stringToObject($data);
          /*
                                   * We want to leave groups that are already in the namespace and add the
                                   * groups loaded into the namespace.  This overwrites any existing group
                                   * with the same name
                                   */
          foreach (get_object_vars($ns) as $k => $v) {
            $this->_registry[$namespace]['data']->$k=$v;
          }
        }
        return TRUE;
      }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52500b20]]
loadXML 
12[[#52500b20]]
loadINI 
13[[#52500b20]]
loadJSON 
21[[#52500aa0]]
'XML' 
22[[#52500aa0]]
'INI' 
23[[#52500aa0]]
'JSON' 
31[[#52500a80]]
&$handler 
32[[#52500a80]]
$handler 
33[[#52500a80]]
$handler