mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	ADVICE: there is no Backwards Compatibility with custom tasks, those using the _config instance will be broken or those using the getEnvironmentName().
		
			
				
	
	
		
			23 lines
		
	
	
		
			676 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			676 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
class Mage_Autoload
 | 
						|
{
 | 
						|
    public static function autoload($className)
 | 
						|
    {
 | 
						|
        $baseDir = dirname(dirname(__FILE__));
 | 
						|
        $classFile = $baseDir . '/' . str_replace('_', '/', $className . '.php');
 | 
						|
        require_once $classFile;
 | 
						|
    }
 | 
						|
 | 
						|
    public static function isLoadable($className)
 | 
						|
    {
 | 
						|
        $baseDir = dirname(dirname(__FILE__));
 | 
						|
        $classFile = $baseDir . '/' . str_replace('_', '/', $className . '.php');
 | 
						|
        return (file_exists($classFile) && is_readable($classFile));
 | 
						|
    }
 | 
						|
 | 
						|
    public static function loadUserTask($taskName)
 | 
						|
    {
 | 
						|
        $classFile = '.mage/tasks/' . ucfirst($taskName) . '.php';
 | 
						|
        require_once $classFile;
 | 
						|
    }
 | 
						|
} |