 |
|
Innovation award
 Nominee: 1x |
This class allows callin functions by passing parameters by name.
It can call a given global function or object function by passing parameters to it by their names instead of having to use the declaration parameter order.
The class uses reflection to determine the function parameter names and parses a string with parameters to extract the parameters values to be passed. It assumes default values for missing parameters.
|
|
| Name: |
Named Parameters |
| Base name: |
named-params |
| Description: |
Call functions passing parameters by name |
| Version: |
1 |
| PHP version: |
5 |
| License: |
Artistic License |
| All time users: |
486 users |
| All time rank: |
5005 |
| Week users: |
1 user |
| Week rank: |
2173  |
| |
|
 September 2011
Number 9 |
Currently PHP requires that you pass parameters to functions by the order they are defined.
Often you do not remember the order of those parameters and you need to check the PHP manual to see what is the right order of each parameter.
An alternative solution would be to support named parameters, so the PHP developers could specify the parameters by any order, just by specifying their names.
Currently PHP does not support named parameters but this class provides a solution that emulates that feature using text strings to pass the parameters to a function.
Manuel Lemos |
| There are not enough user ratings to display for this class. |
| |
Applications that use this class |
|
|
No application links were specified for this class.

If you know an application of this package, send a message to the
author to add a link here.
| |
Files |
|
|