. Dynamic loading | dikini.net
 

Dynamic loading

Intent
Keep working set small and mainatin fast start time by loading features as required
Implementation
use __autoload()
Example
function autoload( $classname) { list($path,$file) = loadpath( $classname ); require_once "$path/$file"; }
Notes
  • we are loading a file, based on some conventions interpreted in loadpath
  • This can be used to implement module-like system, but the lack of subclasses or similar tools makes the 'module' bindings always transparent
Powered by Drupal, an open source content management system