Declarative runtime parameter definition for Parameterizable classes.
Apply this attribute multiple times on a class (Ui5Action, Resource/Data provider, Report provider) to describe each expected request parameter. A central ParameterResolver will:
Key distinction: name vs. uriKey
name = logical backend name
Used as array key in the resolved argument bag and as identifier in the
application code (controller, handler, service).
uriKey = external transport key
The concrete identifier used on the communication layer (path segment or
query string key). This is what the client sends, and what is reflected
into the manifest.
This separation allows:
uriKey may differ from name (e.g. legacy URL key mapped to
a cleaner internal parameter name).Path resolution
uriKey specifies the segment name.Example
#[Parameter(
name: 'projectModel',
uriKey: 'project',
type: ValueType::Model,
source: ParameterSource::Path,
model: Project::class
),
Parameter(
name: 'withPositions',
uriKey: 'withPositions',
type: ValueType::Bool,
source: ParameterSource::Query,
required: false,
default: false
)
]
| Methods | ||
|---|---|---|
public
|
__construct(
string $name,
string $uriKey,
ValueType $type,
ParameterSource $source = ParameterSource::Path,
bool $required = true,
bool $nullable = false,
mixed $default = null,
class-string|null $model = null,
)
|
# |
| Properties | |||
|---|---|---|---|
public
|
string
|
$name
|
# |
public
|
string
|
$uriKey
|
# |
public
|
ValueType
|
$type
|
# |
public
|
ParameterSource
|
$source
|
# |
public
|
bool
|
$required
|
# |
public
|
bool
|
$nullable
|
# |
public
|
mixed
|
$default
|
# |
public
|
class-string|null
|
$model
|
# |