PHP Lazy Global Classes and functions loader (LGCF LOADER) package,
is a package to reproduce a well known concept for the PHP classes and functions loading:
THE LAZY LOADING....
The concept is to globally load classes and functions without need of an autoloader of multi files inclusions.
Did you ever hear about Assetic...? Now this package actually work like it.
Why every body use autoloaders ?
I think the main purpose is to keep their code separated and clean and easy to maintain. Assetic do it well with your
js and css files by letting developers keep their files structures but serving condensed files to the clients.
This package do the same with your PHP classes and functions files.It let you keep your classes files and functions files separated
and easy to maintain but created a global container which regroups in one file all your data which could be lazily served from
anywhere in your pages.
How to use it :
For the test
1-Download the package and unzip it in a folder
2-Download the Persistent PHP Super Globals Array Maker package and unzip the content in the same folder(the content must really be in the same folder)
3-Download the PHP Code Gleaner Package and unzip the content in the same folder(the content must really be in the same folder)
4-Run the install script in the browser.
5-Open any example file in the browser
For your own script
1-Download the package and unzip it a folder
2-Download the Persistent PHP Super Globals Array Maker package and unzip the content in the same folder(the content must really be in the same folder)
3-Download the PHP Code Gleaner Package and unzip the content in the same folder(the content must really be in the same folder)
4-Run the install script in the browser.
5-Open the file LGCF_loader.class.php and change your path at the bottom of the file to load classes and functions.
6-Include the persistent global maker source at the top of your page
7-Include the LGCF_loader.class.php via the statement include_once,include,require etc... at the top of your page
Now you can proceed as shown in the examples files to call your classes or functions
Alternatively ,you can install the package and its dependencies via composer see the download session of this package
to copy and the paste the composer code.
Nb: you can launch progressively the paths on the page you need them instead of launch them once.
This way the caching process will always be short
For more infos about the new things in this version read the changelog.txt file.
Use the forum to report bugs,suggestions and other or contact me at leizmo@gmail.com
The PHP Code Gleaner and Analyzer package can be found at:
https://www.phpclasses.org/package/10697-PHP-Scan-PHP-scripts-to-extract-data-about-the-code.html
The Persistent PHP Super Globals Array Maker can be found at:
https://www.phpclasses.org/package/10822-PHP-Create-array-variables-that-act-like-superglobals.html
|