setParameter no longer works?

Hi?

Could it be, that $myConfig->setParameter(“something”, $something) no longer works in the newest CE version? I’ve used it always in version PE 3.0. Now i have a new Project and i want to use the newest CE Version. How can i solve it? Or should i use the oxsession?

Hi deddy,

couldn’t find “myConfig” in deprecated stuff. Either it shall work or has been ditched before :wink:

Regards

Servus Marco,

ich meinte eigentlich das setparameter. Ich kann das nirgends im Source finden wie das in der jetztigen version verwendet wird. In der älteren 3er PE version konnte man damit doch Variablen mit $myConfig->setParameter(“variable”, “meinwert”); setzen und mit $myConfig->getParameter(“variable”) dann wieder holen. Ich habs jetzt mit Sessions gelöst. Funktioniert auch aber das mit setparameter war schon praktisch.

Gruß Deddy

Hi Marco,

ok :slight_smile: then in english. Once again.
I could set a parameter in the PE 3.0 version in a view class with:
function something() {
global $myConfig;
$myConfig->setParameter(“something”, $something); …
and i could get again the parameter with $myConfig->getParameter(“something”);
I couldn’t find in the newest ce version the setParameter.

Greetings to the Cold North

I would avoid global. Look in oxconfig.php to see the available Methods and how they work:
Config Params: getConfigParam and setConfigParam, setGlobalParameter and getGlobalParameter
Request Params: getParameter, this is taken directly from Get and Post, thus no Set-Method.