
Public Member Functions | |
| __construct ($text='', $xml='') | |
| getParams () | |
| set ($key, $value='') | |
| setAll ($keyedValues) | |
| def ($key, $value='') | |
| get ($key, $default='') | |
| __get ($property) | |
| processInput ($params) | |
| asString () | |
| asPost () | |
| render ($name='params') | |
Protected Attributes | |
| $params = array() | |
| $raw = null | |
| $xml = null | |
Definition at line 45 of file aliroParameters.php.
| aliroParameters::__construct | ( | $ | text = '', |
|
| $ | xml = '' | |||
| ) |
Reimplemented in mosSpecialAdminParameters.
Definition at line 50 of file aliroParameters.php.
00050 { 00051 $this->raw = is_null($text) ? '' : $text; 00052 if (!is_string($this->raw)) trigger_error (T_('Raw data for aliroParameters not a string')); 00053 00054 $this->params = @unserialize($this->raw); 00055 if (!is_array($this->params)) $this->params = array(); 00056 if ($this->raw AND count($this->params) == 0) trigger_error (T_('Raw data for aliroParameters was not null, but did not yield any values')); 00057 00058 foreach ($this->params as &$param) $param = base64_decode($param); 00059 $this->xml = $xml; 00060 }
| aliroParameters::getParams | ( | ) |
| aliroParameters::set | ( | $ | key, | |
| $ | value = '' | |||
| ) |
| aliroParameters::setAll | ( | $ | keyedValues | ) |
| aliroParameters::def | ( | $ | key, | |
| $ | value = '' | |||
| ) |
| aliroParameters::get | ( | $ | key, | |
| $ | default = '' | |||
| ) |
Definition at line 79 of file aliroParameters.php.
00079 { 00080 if (isset($this->params[$key])) return $this->params[$key] === '' ? $default : $this->params[$key]; 00081 else return $default; 00082 }
| aliroParameters::__get | ( | $ | property | ) |
| aliroParameters::processInput | ( | $ | params | ) |
Definition at line 88 of file aliroParameters.php.
References $params, and asString().
00088 { 00089 $inarray = (array) $params; 00090 foreach ($inarray as &$param) if (ini_get('magic_quotes-gpc')) $param = stripslashes($param); 00091 $this->params = $inarray; 00092 return $this->asString(); 00093 }
| aliroParameters::asString | ( | ) |
Definition at line 95 of file aliroParameters.php.
Referenced by processInput().
00095 { 00096 $encoded = array(); 00097 foreach ($this->params as $key=>$param) $encoded[$key] = base64_encode($param); 00098 return serialize($encoded); 00099 }
| aliroParameters::asPost | ( | ) |
| aliroParameters::render | ( | $ | name = 'params' |
) |
Definition at line 105 of file aliroParameters.php.
00105 { 00106 if ($this->xml) { 00107 $params = new aliroXMLParams; 00108 if (is_file($this->xml)) return $params->paramsFromFile($this->xml, $this, $name); 00109 else return $params->paramsFromString($this->xml, T_('Data passed to aliroParameters'), $this, $name); 00110 } 00111 return "<textarea name='$name' cols='40' rows='10' class='text_area'>$this->raw</textarea>"; 00112 }
aliroParameters::$params = array() [protected] |
aliroParameters::$raw = null [protected] |
Definition at line 47 of file aliroParameters.php.
aliroParameters::$xml = null [protected] |
1.5.5