Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2019-02-15 (3 days ago) | | Not yet rated by the users | | Total: 91 This week: 15 | | All time: 9,175 This week: 34 |
|
Description | | Author |
This package allows applications to call helper functions that are loaded dynamically.
It provides a class overloading function to handle static function calls that checks if it exists a script in a helper directory with the name of the static function that is called.
If it script exists, the class loads the script and it automatically calls a function that it contains to execute the code of the called function.
If the script does not exist, it may load it dynamically from a remote site from a given URL. Innovation Award
January 2019
Nominee
Vote |
Most applications need to use a set of general purpose functions that are often referred as helper functions.
Each application script may need some of the available helper functions but usually not all at once that the application as a whole needs.
This package can load helper function scripts dynamically, thus avoiding to use too much memory, which would happen if all the functions were defined in a single script or a list of large scripts with many helper function inside each one.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 2x |
|
Details
php-Helper
(PHP 5 >= 5.3.0, PHP 7)
Static class with automatic function loading
When calling the class H :: funcName, it is checked whether there is a function in the helper directory, if the function is found, then it starts, if it is not there, then we try to download the file from the Internet or local storage and then it is saved to the helper directory and executed.
The address of the repository of function files is specified in the property H :: $ remouteUrl
Example
include 'H.php';
var_dump(H::bc('((($1+$2)*$3)-2)>=6',2,2,2));
var_dump(H::dirList('./'));
Result
string(1) "1"
array(8) {
[".gitignore"]=>
string(10) ".gitignore"
["example.php"]=>
string(11) "example.php"
["H.php"]=>
string(5) "H.php"
["helper"]=>
string(6) "helper"
["README.en.md"]=>
string(12) "README.en.md"
["README.md"]=>
string(9) "README.md"
}
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.