xp-framework/xp-framework — pull request #128 by cconstandachi (2012-02-28 14:49:46+00:00)
Title: Don't access scriptlet.HttpScriptletRequest::params public property, use setters and getters instead

Hi,

There is an issue when accessing the public property `params` directly because the protected property `paramlookup` is not synced anymore: see the implementation of `scriptlet.HttpScriptletRequest::setParam()`:

/**
* Sets a request parameter
*
* @param string name Parameter name
* @param var value
*/
public function setParam($name, $value) {
$l= strtolower($name);
if (isset($this->paramlookup[$l])) {
$name= $this->paramlookup[$l];
} else {
$this->paramlookup[$l]= $name;
}
$this->params[$name]= $value;
}

Maybe we should set `params` property protected aswell.

Let me know what you think,

Cheers,
Cosmin