Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
29 | 3 | 3 | 0.984 | class_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 29 | 323 | libraries/joomla/registry/registry.php |
2 | 29 | 363 | libraries/joomla/registry/registry.php |
3 | 29 | 402 | 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; } |
| ||||
/** * 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; } |
| ||||
/** * 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; } |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#52500b20]] | loadXML |
1 | 2 | [[#52500b20]] | loadINI |
1 | 3 | [[#52500b20]] | loadJSON |
2 | 1 | [[#52500aa0]] | 'XML' |
2 | 2 | [[#52500aa0]] | 'INI' |
2 | 3 | [[#52500aa0]] | 'JSON' |
3 | 1 | [[#52500a80]] | &$handler |
3 | 2 | [[#52500a80]] | $handler |
3 | 3 | [[#52500a80]] | $handler |