PHP Classes

File: autoload.php

Recommend this page to a friend!
  Classes of Roni   Easy PHP Bangla Date   autoload.php   Download  
File: autoload.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Easy PHP Bangla Date
Extends DateTime class to format Bangla dates
Author: By
Last change:
Date: 6 years ago
Size: 375 bytes
 

Contents

Class file image Download
<?php

spl_autoload_register
(function ($sClassName) {
   
$name_space_part = explode('\\', $sClassName);
    if (
$name_space_part[0] === 'EasyBanglaDate') {
       
array_shift($name_space_part);
       
$sClassName = implode(DIRECTORY_SEPARATOR, $name_space_part);
       
$file = __DIR__ . DIRECTORY_SEPARATOR . $sClassName . '.php';
        require_once(
$file);
    }
});