Login   Register  
PHP Classes
elePHPant
Icontem

File: lib/init.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2012-09-22 21:34
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');