| 
<?php
 function toolClosureTableAutoload($class) {
 if (substr($class, 0, strlen("Tool_ClosureTable_")) === 'Tool_ClosureTable_') {
 $file = dirname(__FILE__).DIRECTORY_SEPARATOR.strtr(substr($class, strlen("Tool_ClosureTable_")), '_', DIRECTORY_SEPARATOR).'.php';
 if(is_file($file)) {
 include $file;
 } else {
 throw new Exception("autoloading of class $class impossible.");
 }
 }
 }
 spl_autoload_register('toolClosureTableAutoload');
 set_include_path(get_include_path().PATH_SEPARATOR.realpath(dirname(__FILE__)));
 
 |