Login   Register  
PHP Classes

File: demo/autoloader.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ordland Euroboros  >  PHP Collections Framework  >  demo/autoloader.php  >  Download  
File: demo/autoloader.php
Role: Auxiliary script
Content type: text/plain
Description: The Autoload File
Class: PHP Collections Framework
Manipulate collections of objects like Java and C#
Author: By
Last change:
Date: 1 year ago
Size: 340 bytes


Class file image Download

function __autoload($class) {
$stack explode('\\'$class);
$class array_pop($stack);
$namespace array_pop($stack);
$file strtolower("../{$namespace}/{$class}.php");
file_exists($file)) include($file);
    else throw new \
Resource\Exception\ClassNotFoundException("Cannot load class {$class}");