Perhaps consider providing a simpler alternative get method

Created on 22 July 2025, 12 days ago

The recommended way to get a strict Parameter doesn't really work. You can't just say:

Parameter::get('mykey','strict');

This fails because all the other following arguments need to be call-by-reference.
So if you want the strict call you have the rather complicated:

$context='strict';
echo Parameter::get('mykey',$context);

Additionally you also need the "->getProcessedData()->getValue();" part everytime.
This is a bit complicated for simple strings or secrets. I'd suggest providing a convenience method:

echo Parameter::getStrictValue('mykey');

that does all these things at once and is thus equivalent to:

$context='strict';
echo Parameter::get('mykey',$context)->getProcessedData()->getValue();
Feature request
Status

Active

Version

1.6

Component

Code

Created by

🇩🇪Germany rgpublic Düsseldorf 🇩🇪 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024