PHP Classes

PHP Module Loader v2: Load classes that add modular functionality

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 143 All time: 9,172 This week: 38Up
Version License PHP version Categories
module-loader2 2.0BSD License5.0PHP 5, Language
Description 

Author

This class can load classes that add modular functionality.

It can load a module that is a class that implements additional functionality by calling or accessing an array class variable.

The class can also list the loaded modules and unload loaded modules.

Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 34
All time rank: 1107160 in United States United States
Week rank: 216 Up24 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Example

<?php

require_once 'lib/Autoloader.php';

spl_autoload_register('Autoloader::load');

$mod = new Modules;

print_r($mod->modules);

$mod->loadModule('Defaults');

$mod->modules['Defaults']->test();

$mod->unloadModule('Defaults');

print_r($mod->modules);


  Files folder image Files (4)  
File Role Description
Files folder imagelib (1 file, 1 directory)
Files folder imagemodules (1 directory)
Accessible without login Plain text file example.php Example Example File

  Files folder image Files (4)  /  lib  
File Role Description
Files folder imageClasses (1 file)
  Plain text file Autoloader.php Class Class Script

  Files folder image Files (4)  /  lib  /  Classes  
File Role Description
  Plain text file Modules.class.php Class Class Script

  Files folder image Files (4)  /  modules  
File Role Description
Files folder imageDefaults (1 file)

  Files folder image Files (4)  /  modules  /  Defaults  
File Role Description
  Plain text file Defaults.mod.php Class Class Script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:143
This week:0
All time:9,172
This week:38Up