-
Notifications
You must be signed in to change notification settings - Fork 27
Autoloader
cweiske edited this page Mar 16, 2012
·
1 revision
You should use an autoloader with Erfurt. It takes care of including the correct files:
set_include_path( get_include_path() . PATH_SEPARATOR . __DIR__ . '/lib/Erfurt/' . PATH_SEPARATOR . __DIR__ . '/lib/Zend/' ); require_once 'Zend/Loader/Autoloader.php'; $al = Zend_Loader_Autoloader::getInstance(); $al->registerNamespace('Erfurt_'); $al->registerNamespace('Zend_');
In this example, the application file layout is as follows:
index.php - the file in which the autoloader is setup lib/ Erfurt/ - cloned erfurt git repository Zend/ - "library/Zend" from the zend download