parent =& $this; } $this->_adapters[$name] =& $adapter; return true; }else{ $this->abort(JText::_('Incorrect version!')); } } /** * Method to parse the variables of a plugin, build the INI * string for it's default variables, and return the INI string. * * @access public * @return string INI string of parameter values * @since 1.5 */ function getVariables() { // Get the manifest document root element $root = & $this->_manifest->document; // Get the element of the tag names $element =& $root->getElementByPath('variables'); if (!is_a($element, 'JSimpleXMLElement') || !count($element->children())) { // Either the tag does not exist or has no children therefore we return zero files processed. return null; } // Get the array of variable nodes to process $vars = $element->children(); if (count($vars) == 0) { // No variables to process return null; } // Process each variable in the $vars array. $ini = null; foreach ($vars as $var) { if (!$name = $var->attributes('name')) { continue; } if (!$value = $var->attributes('default')) { continue; } $ini .= $name."=".$value."\n"; } return $ini; } }