<?php
class autoloader {
    static function autoloadClasses($className) {
        $classes = array(
            'Form' => '/Form/Form.php',
            'EntityRepository' => '/Entity/EntityRepository.php',
            'Acl' => '/class/ACL/Acl.php',
            'AclRepository' => '/class/ACL/AclRepository.php',
            'Translator' => '/class/Translator/Translator.php',
            'Login' => '/class/Login/Login.php',
            'LoginRepository' => '/class/Login/LoginRepository.php',
            'LoginForm' => '/Form/LoginForm.php',
            'DataBase' => '/class/DataBase/DataBase.php',
            'FlashMessenger' => '/class/FlashMessenger/FlashMessenger.php',
            'FormValidator' => '/class/FormValidator/FormValidator.php',
            'Ajax'=>'/Controller/Ajax/Ajax.php',
            'AjaxModalForms'=>'/Controller/Ajax/AjaxModalForms.php',
            'PDF' => '/class/Pdf/pdf.php',
            'FPDI' => '/class/Pdf/fpdi.php',
            'UploadFile' => '/class/UploadFile/UploadFile.php',
            'FileManagement' => '/class/FileManagement/FileManagement.php',
            'jUploadPHP' => '/class/UploadFile/jUploadPHP.php',
            'Tools' => '/class/Tools/Tools.php',
            'zipfile' => '/class/ZipFile/zipfile.php',
            'Emailer' => '/class/PHPMailer/Emailer.php',
            'PHPMailer' => '/class/PHPMailer/class.phpmailer.php',
            'PHPExcel' => '/class/PHPExcel/PHPExcel.php',
            'PHPExcel_IOFactory' => '/class/PHPExcel/PHPExcel/IOFactory.php',
            'PHPExcel_Reader_IReadFilter' => '/class/PHPExcel/PHPExcel/Reader/IReadFilter.php',
            'NumeroALetra' => '/class/Tools/NumeroALetra.php',
            'BarCode' => '/class/BarCode/BarCode.php',
            'SettingsRepository'=>'/Entity/SettingsRepository.php',
            'EmailingForm'=>'/Form/EmailingForm.php',
            'EmailingAjax'=>'/Controller/Ajax/EmailingAjax.php',            
            'AdvancedSearchForm' => '/Form/AdvancedSearchForm.php', 

            'CompanyRepository' => '/Entity/CompanyRepository.php',
            'CompanyForm' => '/Form/CompanyForm.php', 
            
            'UserAjax'=>'/Controller/Ajax/UserAjax.php',
            'UserEntity' => '/Entity/UserEntity.php',
            'UserRepository' => '/Entity/UserRepository.php',
            'UserForm' => '/Form/UserForm.php',
            
            'VendorAjax'=>'/Controller/Ajax/VendorAjax.php',
            'VendorRepository' => '/Entity/VendorRepository.php',
            'VendorForm' => '/Form/VendorForm.php',          
            
            'PurchaseAjax'=>'/Controller/Ajax/PurchaseAjax.php',
            'PurchaseRepository' => '/Entity/PurchaseRepository.php',
            'PurchaseForm' => '/Form/PurchaseForm.php',          
            
            'PagoAjax'=>'/Controller/Ajax/PagoAjax.php',
            'PagoPDF'=>'/Controller/Pdf/PagoPDF.php',
            'PagoRepository' => '/Entity/PagoRepository.php',
            'PagoDetailsTempRepository'=>'/Entity/PagoDetailsTempRepository.php',
            'PagoForm' => '/Form/PagoForm.php',
            'PagoBuscarForm' => '/Form/PagoBuscarForm.php',
            
            'ReportAjax'=>'/Controller/Ajax/ReportAjax.php',
            'ReportForm' => '/Form/ReportForm.php',            
            'ReportListEntity' => '/Entity/ReportListEntity.php',
            'ReportListRepository' => '/Entity/ReportListRepository.php',           
            
        );
        if (isset($classes[$className])) {
            require_once(ROOT . $classes[$className]);
        }
    }    
}