/** * * __autoLoad * * magic auto load method * * All files will be included should be prefixed with copper and be in CamelCase * * @author Emilio Astarita * @package copperFramework */ function __autoLoad($className) { $classFile = copperConfig::libPath($className . '.php'); if (preg_match("/^copper/", $className) && file_exists($classFile)) { require_once $classFile; } else { throw new Exception("Class not found: `{$className}`."); } }