HandlerDefinitionNormalizer
API reference › Yii3 Debug › Routing › HandlerDefinitionNormalizer
Converts Yii router middleware definitions into safe, stable scalar labels.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
describe() static | Formats an action or middleware definition without retaining its object graph or configuration values. | HandlerDefinitionNormalizer |
describeAll() static | Formats every handler definition, dropping the ones that carry no recognizable name. | HandlerDefinitionNormalizer |
Method details
Section titled “Method details”describe()
Section titled “describe() ”public static function describe(mixed $definition): string|nullFormats an action or middleware definition without retaining its object graph or configuration values.
Parameters
| Parameter | Type | Description |
|---|---|---|
$definition | mixed | Handler as a class name, a ['class' => ...] array, a callable pair, or any other value. |
Returns
string|null: Scalar label, or null when the definition carries no recognizable name.
describeAll()
Section titled “describeAll() ”public static function describeAll(array<array-key, mixed> $definitions): list<string>Formats every handler definition, dropping the ones that carry no recognizable name.
Parameters
| Parameter | Type | Description |
|---|---|---|
$definitions | array<array-key, | Handler definitions in declaration order. |
Returns
list<string>: Scalar labels in the same order, unnamed handlers omitted.