File: src/autoloader.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria  >  PHP EU VAT Validation  >  src/autoloader.php  >  Download  
File: src/autoloader.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP EU VAT Validation
Validate VAT number using VIES API
Author: By
Last change: Bump Year (copyright header)
Date: 1 year ago
Size: 668 bytes
 

Contents

Class file image Download
<?php
/**
 * Manual Autoloader File (if composer isn't installed)
 *
 * @author Pierre-Henry Soria <pierrehenrysoria@gmail.com>
 * @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
 * @license GNU General Public License; <https://www.gnu.org/licenses/gpl-3.0.en.html>
 */

namespace PH7\Eu;

// Autoloading Classes Files
spl_autoload_register(function ($sClass) {
   
// Hack to remove namespace and backslash
   
$sClass = str_replace([__NAMESPACE__ . '\\', '\\'], DIRECTORY_SEPARATOR, $sClass);

   
// Get library classes
   
if (is_file(__DIR__ . $sClass . '.php')) {
        require_once
__DIR__ . $sClass . '.php';
    }
});


For more information send a message to info at phpclasses dot org.