PHP Classes
elePHPant
Icontem

PHP LGCF Loader: Load classes and functions when needed

Recommend this page to a friend!
  Info   View files Example   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-06-29 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 175 All time: 8,359 This week: 408Up
Version License PHP version Categories
lgcfloader 3.0.0Custom (specified...5PHP 5, Language
Description Author

This package can be used to load classes and functions when needed.

It can load scripts with classes or functions on demand from a given path.

The loaded classes and functions are stored in session variables to avoid further class or function script reloading.

Innovation Award
PHP Programming Innovation award nominee
October 2017
Number 5
Autoloading allows PHP to load classes using configurable rules, so developers do not have to write too much code to load all the class scripts they need.

This package not only can autoload classes, but also can cache the code of the classes to be loaded in session variables, so class loading can be done faster from memory.

Manuel Lemos
  Performance   Level  
Name: zinsou A.A.E.Moïse <contact>
Classes: 45 packages by
Country: Benin Benin
Innovation award
Innovation award
Nominee: 17x

Winner: 2x

Details
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
  Files folder image Files  
File Role Description
Files folder imageexamples (3 files)
Accessible without login Plain text file changelog.txt Doc. change log
Accessible without login Plain text file example.php Example first example file
Accessible without login Plain text file LGCFLOADER_LICENSE_FILE.txt Lic. license file
Plain text file LGCF_Loader.class.php Class class source
Accessible without login Plain text file myclasses.php Aux. classes for test purposes
Accessible without login Plain text file myfunctions.php Data functions for test purposes
Accessible without login Plain text file readme.txt Doc. readme

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file example1.php Example example script
  Accessible without login Plain text file example2.php Example example script
  Accessible without login Plain text file example3.php Example example script

Downloadlgcfloader-2018-06-29.zip 9KB
Downloadlgcfloader-2018-06-29.tar.gz 6KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Code Gleaner and Analyzer Tool Download .zip .tar.gz mother class which this class extends package Required
Persistent PHP Superglobals Array Maker Download .zip .tar.gz require to make custom super global $_LGCF_LOADER available Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:175
This week:0
All time:8,359
This week:408Up
User Comments (1)