library/Garp/Content/Import/Factory.php
public static function mapExtensionToType($dataFile) {
        $ext = substr(strrchr($dataFile, '.'), 1);
        $ext = strtolower($ext);
        switch ($ext) {
            case 'xls':
            case 'xlsx':
                return 'Excel';
            break;
            case 'json':
                return 'Json';
            break;
            default:
                throw new Garp_Content_Import_Exception("Could not find importer for type $ext");
            break;
        }
    }
public static function mapExtensionToType($dataFile) {
        $ext = substr(strrchr($dataFile, '.'), 1);
        $ext = strtolower($ext);
        switch ($ext) {
            case 'xls':
            case 'xlsx':
                return 'Excel';
            break;
            case 'json':
                return 'Json';
            break;
            default:
                throw new Garp_Content_Import_Exception("Could not find importer for type $ext");
            break;
        }
    }
public static function mapExtensionToType ( $ dataFile ) { $ ext = substr ( strrchr ( $ dataFile , '.' ) , 1 ) ; $ ext = strtolower ( $ ext ) ; switch ( $ ext ) { case 'xls' : case 'xlsx' : return 'Excel' ; break ; case 'json' : return 'Json' ; break ; default : throw new Garp_Content_Import_Exception ( "Could not find importer for type $ext" ) ; break ; } }
Map a file extension to a type of importer
@param String $dataFile Filename of the datafile
@return String
Map a file extension to a type of importer