PHP Classes

File: lib/init.php

Recommend this page to a friend!
  Classes of Oscar Gentilezza   Hybrid Cache   lib/init.php   Download  
File: lib/init.php
Role: Auxiliary script
Content type: text/plain
Description: Autoloader
Class: Hybrid Cache
Store key-value pairs in different containers
Author: By
Last change:
Date: 12 years ago
Size: 318 bytes
 

Contents

Class file image Download
<?php

function hybrid_classes_autoload ($class) {

   
$classPath = explode('\\',$class);

    if (
$classPath[0] == 'Hybrid') {
       
$file = dirname(__FILE__) . "/" . strtolower(implode('/',$classPath)) .".php";

        if (
file_exists($file)) {
            require_once(
$file);
        }
    }
};

spl_autoload_register('hybrid_classes_autoload');