Slide 45
Slide 45 text
Autoloader Implementation Revisited
class Autoloader {
public function __construct($root) {...}
public function load($class) {
$path = $path->root;
$path .= str_replace(‘\\’, ‘/’, $class);
if (file_exists($path)) require $path;
}
}