public function setDirectory($directory) { spl_autoload_register(autoloader_for("Providers\\", $directory)); }
public function setDirectory($directory) { spl_autoload_register(autoloader_for("Resources\\", $directory)); array_push($this->directories, $directory); }
<?php error_reporting(E_ALL ^ E_WARNING); require_once "autoloader.php"; spl_autoload_register(autoloader_for("Engine\\", __DIR__ . "/engine/")); spl_autoload_register(autoloader_for("Engine\\", __DIR__ . "/engine/interfaces/")); spl_autoload_register(autoloader_for("Engine\\", __DIR__ . "/engine/providers/")); spl_autoload_register(autoloader_for("Engine\\", __DIR__ . "/engine/requests/")); spl_autoload_register(autoloader_for("Resources\\", __DIR__ . "/engine/resources/")); $engine = new \Engine\Engine(); $engine->registerResourceDir(__DIR__ . "/resources/"); $engine->registerProviderDir(__DIR__ . "/providers/"); $engine->run();