Last active
August 29, 2015 13:57
-
-
Save code-poel/9608412 to your computer and use it in GitHub Desktop.
Magento Autoloading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('DS', DIRECTORY_SEPARATOR); | |
| define('PS', PATH_SEPARATOR); | |
| define('BP', dirname(dirname(__FILE__))); | |
| Mage::register('original_include_path', get_include_path()); | |
| if (defined('COMPILER_INCLUDE_PATH')) { | |
| $appPath = COMPILER_INCLUDE_PATH; | |
| set_include_path($appPath . PS . Mage::registry('original_include_path')); | |
| include_once COMPILER_INCLUDE_PATH . DS . "Mage_Core_functions.php"; | |
| include_once COMPILER_INCLUDE_PATH . DS . "Varien_Autoload.php"; | |
| } else { | |
| /** | |
| * Set include path | |
| */ | |
| $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local'; | |
| $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community'; | |
| $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core'; | |
| $paths[] = BP . DS . 'lib'; | |
| $appPath = implode(PS, $paths); | |
| set_include_path($appPath . PS . Mage::registry('original_include_path')); | |
| include_once "Mage/Core/functions.php"; | |
| include_once "Varien/Autoload.php"; | |
| } | |
| Varien_Autoload::register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment