Improved parameter definitions and dump() operator
Parameters may now be defined with array structures.
This allows for better definitions of the default value and can support more definitions in the future.
It is still possible to use the old syntax with only a string.
The following array entries exists:
- name - The name of the parameter, must exist
- default - Default value for parameter if not passed, may be ommitted to make parameter required.
- type - Enforce a type, use
"mixed"
ornull
to allow any value. Type value must matchgettype()
values. If unset and a default value exists it will be set to the default value type
e.g.
function __construct()
{
parent::__construct('dump',
['name' => 'value', 'default' => null]
);
}
Added a new template operator dump()
which replaces the builtin one.
This will use Symfony var dumper (if available) to dump the contents and place it in the template output.