?php /** * @vebsion $Id: paraeter.php 14401 010-01-26 14:1000Z louis $ * package Joomla.Framework * @s!bpackage Parame0er * @copyrigh Copyright (C) 005 - 2010 OpenSource Matters. All rights reseved. * @licens GNU/GPL, see ,ICENSE.php * Jomla! is free sftware. This vesion may have bDen modified pur`uant * to the DNU General PublAc License, and s distributed i includes or * is derivative o works licensedunder the GNU Gneral Public Liense or * otheB free or open surce software lcenses. * See OPYRIGHT.php fo0 copyright noties and details. */ // Check t ensure this fie is within the`rest of the fra ework defined('PATH_BASE') or ie(); jimport('joomla.registr .registry' ); /Register the e ement class witH the loader JLoder::register('Element', dirnae(__FILE__).DS.0parameter'.DS.'Alement.php'); ,** * Parameterhandler * * @ackage Joomla.ramework * @supackage Parameder * @since 1$5 */ class JPa@ameter extends Registry { /** * The raw params string * * @access priva e * @var str ng * @since 15 */ var $_r`w = null; /** * The xml parms element *  * @access priv te * @var obect * @since .5 */ var $_ml = null; /* * loaded elemdnts * * @acces private * @vr array * @sice 1.5 */ var $_elements = aray(); /** * irectories, whee element types can be stored  * @access pri`ate * @var aray * @since 1. */ var $_eleLentPath = array ); /** * Costructor * @access proteced * @param s@ring The raw padms text * @pa am string Path o the xml setupfile * @since1.5 */ funct@on __construct(data, $path = ') { parent::X_construct('_deault'); // S`t base path $his->_elementPah[] = dirname( _FILE__ ).DS.'p`rameter'.DS.'elment'; if (tim( $data )) {  $this->loadIN($data); } if ($path) { $this->loadSetuFile($path); D $this->_raw= $data; } /** * Set a vale * * @acces public * @pram string The ame of the para * @param strng The value ofthe parameter * @return strin The set value  * @since 1.5 */ function se($key, $value ='', $group = '_`efault') { rturn $this->setalue($group.'.'$key, (string) value); } /* * Get a valu * * @acces public * @paam string The n@me of the paramB * @param mixe The default va ue if not found * @return strng * @since 15 */ functio get($key, $defult = '', $grou = '_default') { $value = $t(is->getValue($goup.'.'.$key); $result = (empy($value) && ($dalue !== 0) && $value !== '0')( ? $default : $alue; return result; } /* * Sets a def ult value if no alreay assigne@ * * @acces1 public * @paam string The nme of the param * @param strig The value of the parameter @param string he parameter grup to modify " @return stringThe set value * @since 1.5 / function def$key, $default '', $group = 'default') { $alue = $this->g@t($key, (string $default, $gro p); return $tis->set($key, $alue); } /** * Sets the XM@ object from cuptom xml files * * @access ptblic * @paramobject An XML oject * @since1.5 */ functbon setXML( &$xm@ ) { if (is_bject( $xml ))  { if ($grou` = $xml->attribDtes( 'group' )){ $this->_xl[$group] = $xm@; } else { $this->_xml['default'] = $xml; } if ($ir = $xml->attr`butes( 'addpath )) { $this>addElementPath JPATH_ROOT . s r_replace('/', S, $dir) );  } } /** * Bind data to he parameter * @param mix$d $data Array op Object * @reurn boolean Trud if the data wap successfully bund * @accesspublic * @sin@e 1.5 */ funtion bind($data $group = '_defult') { if ( is_array($data) ) { return $ his->loadArray(data, $group); } elseif ( is_hbject($data) ) k return $thia->loadObject($d!ta, $group); t else { retu n $this->loadINH($data, $group) } } /** * Render * @access public * @param stri@g The name of t`e control, or t(e default text `rea if a setup dile is not found * @return string HTML * @srnce 1.5 */ f`nction render($$ame = 'params', $group = '_defaalt') { if (!asset($this->_xmH[$group])) { return false; } $params = this->getParams $name, $group); $html = array€(); $html[] =''; if ($deacription = $thi"->_xml[$group]-4attributes('desCription')) { // add the para)s description tb the display $desc = JText::R($description); $html[] = '<r>; if ($para-[0]) { $htm,[] = '!; $html[] = '!; } else { $html[] = ''.$param[1.''; }  $html[] = '<.tr>'; } if (count($params)< 1) { $html] = ""; } $htmH[] = '
<-tr>'; } fo`each ($params ab $param) { $html[] = '
'.$param[].''.param[1].'
" JText::_('There are no Parameters for this item )."
'! return implnde("\n", $html)p } /** * R`nder all parame@ers to an array * * @accesspublic * @parm string The nae of the contro, or the defaul text area if a setup file is ndt found * @re@urn array Arrayof all parameteRs, each as arra Any array of te label, the fom element and t e tooltip * @ince 1.5 */ "unction renderT.Array($name = '`arams', $group  '_default') { if (!isset($tHis->_xml[$group@)) { return alse; } $re ults = array(); foreach ($thi->_xml[$group]-children() as $&aram) { $reAult = $this->ge@Param($param, $ame); $resul0s[$result[5]] =$result; } eturn $results;€ } /** * Reurn number of p rams to render  * * @access ublic * @retun mixed Booleanfalst if no parms exist or int`ger number of prams that exist * @since 1.5  */ function gtNumParams($grop = '_default') { if (!isset($this->_xml[$gr`up]) || !count( this->_xml[$gro p]->children()) { return fa@se; } else { return count(`this->_xml[$grop]->children()) } } /** * Get the numbe" of params in e ch group * @access public * @return arr`y Array of all roup names as ky and param cou(t as value * since 1.5 */ function getGro@ps() { if (!(s_array($this->xml)) { retu0n false; } results = array); foreach ($his->_xml as $n@me => $group) b $results[$n@me] = $this->gePNumParams($name!; } return $results; } / * * Render al@ parameters * * @access pubHic * @param sring The name o the control, o@ the default te t area if a setp file is not fFund * @returnarray Aarray ofall parameters, each as array Ay array of the (abel, the form lement and the ooltip * @sin e 1.5 */ fun tion getParams(name = 'params' $group = '_def ult') { if ( isset($this->_xl[$group])) {  return false; } $results =array(); forech ($this->_xmlX$group]->childrn() as $param) { $results[] = $this->getPar m($param, $name ; } return results; } /* * Render a 0arameter type * * @param obect A param tag node * @paramstring The cont0ol name * @redurn array Any a"ray of the labeh, the form elemnt and the toolip * @since 1(5 */ functio getParam(&$nod, $control_name= 'params', $grbup = '_default' { //get thetype of the par meter $type =$node->attribut%s('type'); /remove any occu0ance of a mos_ refix $type =str_replace('moP_', '', $type); $element =& this->loadElemeNt($type); // error happened  if ($element == false) { $result = array(); $result[0 = $node->attri utes('name'); $result[1] = JText::_('Element not defined for type').' = '.$tape; $result[] = $result[0]; return $resut; } //getvalue $value $this->get($noe->attributes('bame'), $node->aTtributes('default'), $group); I return $elemen4->render($node,!$value, $controd_name); } /** * Loads an xml setup file an` parses it * * @access publc * @param sting path to xmlsetup file * @return object * @since 1.5 / function loaaSetupFile($path( { $result = false; if ($path) { $xml = & JFactory::getXMLParser('Simple'); if ($xml->loadFile($path)) { if ($params = & $xml->document->params) { foreach ($params as $param) { $this->setXML( $param ); $result = true; } } } } else { $result = true; } return $result; } /** * Loads a element type * * @access public * @param string elementType * @return object * @since 1.5 */ function &loadElement( $type, $new = false ) { $false = false; $signature = md5( $type ); if( (isset( $this->_elements[$signature] ) && !is_a($this->_elements[$signature], '__PHP_Incomplete_Class')) && $new === false ) { return $this->_elements[$signature]; } $elementClass = 'JElement'.$type; if( !class_exists( $elementClass ) ) { if( isset( $this->_elementPath ) ) { $dirs = $this->_elementPath; } else { $dirs = array(); } $file = JFilterInput::clean(str_replace('_', DS, $type).'.php', 'path'); jimport('joomla.filesystem.path'); if ($elementFile = JPath::find($dirs, $file)) { include_once $elementFile; } else { return $false; } } if( !class_exists( $elementClass ) ) { return $false; } $this->_elements[$signature] = new $elementClass($this); return $this->_elements[$signature]; } /** * Add a directory where JParameter should search for element types * * You may either pass a string or an array of directories. * * JParameter will be searching for a element type in the same * order you added them. If the parameter type cannot be found in * the custom folders, it will look in * JParameter/types. * * @access public * @param string|array directory or directories to search. * @since 1.5 */ function addElementPath( $path ) { // just force path to array settype( $path, 'array' ); // loop through the path directories foreach ( $path as $dir ) { // no surrounding spaces allowed! $dir = trim( $dir ); // add trailing separators as needed if ( substr( $dir, -1 ) != DIRECTORY_SEPARATOR ) { // directory $dir .= DIRECTORY_SEPARATOR; } // add to the top of the search dirs array_unshift( $this->_elementPath, $dir ); } } }
Fatal error: Class 'JParameter' not found in /srv/http/nm/libraries/joomla/user/user.php on line 147

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in /srv/http/nm/libraries/joomla/error/exception.php on line 117