Recommend this page to a friend! |
Download .zip |
Info | Example | View files (3) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 159 | All time: 8,956 This week: 190 |
Version | License | PHP version | Categories | |||
parameters-handler 1.0.2 | BSD License | 5.2 | HTTP, PHP 5 |
<?php |
There are two typical tasks, among the others, when you initialise the PHP script:
The ParmOpts class supplies the methods simplifying these tasks.
The data input is detected during the class instantiation and the request or CLI parameters are saved. The request parameters are accepted from different sources by overwriting the values of the same key according to given priority.
The default options are updated with the input parameter values by adjusting the data types taken from the defaults. The allowance is checked before adjusting the type or replacing the default value with the empty one. The saved parameters and options can be accessed as arrays or objects.
$obj = new ParmOpts( [ $pty ] );
$pty - the merging priority of the request parameters (higher to a lower, default by 'JPG'):
The parameters are saved by the constructor.
$obj->Opts( $opt [, $rqt = null ] );
Save the options, updating the defaults with the parameter values.
$obj->Get( [ $prp = 'rqt' [, $flg = false ] ] );
Read the saved data.
Upload the files to any web directory and run the example.php. The following files are included:
01 Apr 2016
22 Nov 2017
Please [contact] on any product-related questions.
[contact]: mailto://vallo@vregistry.com
Files |
File | Role | Description |
---|---|---|
example.php | Example | Example script |
ParmOpts.php | Class | Class source |
README.md | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.