Skip to content

Autoloading

Till Wehowski edited this page Apr 14, 2015 · 7 revisions

Autoloading

The frdl\webfan\Autoloading\SourceLoader autoloader class provides to use the following autoloader strategies or a mix of them within one application:

  • psr-0
  • psr-4
  • class mapping
  • Remote (RPC)

Example file

Methods

**Note: ** The remote RPC autoloading is a stream wrapper registered by the App class, wich is a stream wrapper itself in this case and wich delegates the streaming methods to the plugged aliased classes, webfan\Loader in the case of autoloading source.

Disable Remote Autoloader

` <?php

//...
/**
*
* Disable remote autoloading:
*
**/

webfan\Loader::top()
          ->  unregister(array(webfan\Loader::top(),'autoloadClassFromServer'))
   ;

 //...
?>`
Clone this wiki locally