Class mr_autoload

Description

MR Autoload

Used to automatically load class files. This is optimized to automatically include MR Framework class files. Extreme caution must be used when adding additonal autoloaders, meaning debug what this class does when you add your new autoloader. You may find that it would be more efficient to extend this class and override autoload() to suite your needs.

  • author: Mark Nielsen

Located in /autoload.php (line 45)


	
			
Variable Summary
Method Summary
static void register ([mr_autoload $autoload = NULL])
static void unregister ([mr_autoload $autoload = NULL])
mr_autoload __construct ([string $namespace = 'local/mr/framework'])
boolean autoload (string $class)
Variables
static mr_autoload $instance (line 52)

Instance of mr_autoload

  • access: protected
mr_helper $helper (line 59)

Helper

  • access: protected
Methods
static get_instance (line 81)

Return a static default instance of mr_autoload

  • access: public
static mr_autoload get_instance ()
static register (line 125)

Register a mr_autoload

Don't call this unless you know what you are doing!

  • throws: coding_exception
  • access: public
static void register ([mr_autoload $autoload = NULL])
  • mr_autoload $autoload: An instance of mr_autoload or NULL
static unregister (line 141)

Unregister a mr_autoload

Don't call this unless you know what you are doing!

  • throws: coding_exception
  • access: public
static void unregister ([mr_autoload $autoload = NULL])
  • mr_autoload $autoload: An instance of mr_autoload or NULL
Constructor __construct (line 69)

Constructor

Set up the helper to assist with autoloading.

  • throws: coding_exception
  • access: public
mr_autoload __construct ([string $namespace = 'local/mr/framework'])
  • string $namespace: The namespace to pass to the helper, cannot be empty string.
autoload (line 99)

Autoload

Does the actual autoloading and is optimized for MR Framework. If you want to register your own autoloader it might be wise to extend this class and optimize autoload() for your particular use case.

  • access: public
boolean autoload (string $class)
  • string $class: The class name that needs to be loaded

Documentation generated on Thu, 28 Jun 2012 16:33:46 -0700 by phpDocumentor 1.4.3