PHP Classes
elePHPant
Icontem

Loader Class: Automatically load MVC and library classes

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-06-07 (4 years ago) RSS 2.0 feedStarStarStarStar 62%Total: 677 All time: 4,579 This week: 1,068Up
Version License PHP version Categories
loader 1.0BSD License5.3PHP 5, Language
Description Author

This class can automatically load MVC and library classes.

It can register several automatic class loader functions to load different types of project classes from different directories.

Currently it can load class scripts for models, controller, user and system library classes. The respective directories are configured using constants.

Picture of Ivan Stojmenovic
Name: Ivan Stojmenovic <contact>
Classes: 2 packages by
Country: Serbia Serbia

Details
Installation is weary simple. Folow next steps:
----------------------------------------------------------------
1. Initialize loader class.
   
$loader = new Loader();

Or u can use getInstanece() like this.

Loader::getInstance();

All class from libraries, controllers, models will be loaded. Just need create new instance for all classes. Dont need include or require function.

----------------------------------------------------------------
Methods:
----------------------------------------------------------------

* getInstance() = Singleton instance
* load_specific_library()  = Method for load specific library.
* initialize_class()  = Methot for initializing defined class
* user_library() = Load all user lib's from app/library directories.
* system_library() = Load all core library from /lib/ directory or system/ 
* user_model() = Load all user models from /app/models/
* user_controller() = Load all user controller from /app/controllers/
* controller() = Load specific controller from /app/controllers/
* model() = Load specific model from /app/models/
* library() = Load specific library from /app/models/
* core_library() = Load specific library from /lib/
* config() = Load config files from /app/config. Create dir if missing.
  Files folder image Files  
File Role Description
Files folder imageapp (4 directories)
Files folder imagelib (1 file)
Accessible without login Plain text file example.php Example example
Accessible without login Plain text file index.php Example Example how to use
Accessible without login Plain text file readme.txt Doc. How to install

  Files folder image Files  /  app  
File Role Description
Files folder imagecontrollers (1 file)
Files folder imagelibrary (1 file)
Files folder imagemodels (1 file)
Files folder imageviews (1 file)

  Files folder image Files  /  app  /  controllers  
File Role Description
  Plain text file blog.php Class test controller class

  Files folder image Files  /  app  /  library  
File Role Description
  Plain text file my_lib.php Class test user library

  Files folder image Files  /  app  /  models  
File Role Description
  Plain text file test_model.php Class test modell class

  Files folder image Files  /  app  /  views  
File Role Description
  Accessible without login HTML file template.html Example simple template

  Files folder image Files  /  lib  
File Role Description
  Plain text file loader.php Class Loader core class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:677
This week:0
All time:4,579
This week:1,068Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:62%StarStarStarStar
Rank:945