Page MenuHomeDevCentral

No OneTemporary

diff --git a/src/Registration/Autoloader.php b/src/Registration/Autoloader.php
index c3d6296..25502a0 100644
--- a/src/Registration/Autoloader.php
+++ b/src/Registration/Autoloader.php
@@ -1,29 +1,35 @@
<?php
declare(strict_types=1);
namespace Keruald\OmniTools\Registration;
class Autoloader {
///
/// PSR-4
///
public static function registerPSR4 (string $namespace, string $path) : void {
$loader = new PSR4\Autoloader($namespace, $path);
$loader->register();
}
///
/// Methods to register OmniTools library
///
public static function selfRegister () : void {
+ // The PSR-4 autoloader needs those classes as dependencies:
+ require_once __DIR__ . "/PSR4/Autoloader.php";
+ require_once __DIR__ . "/PSR4/Solver.php";
+ require_once __DIR__ . "/../IO/File.php";
+ require_once __DIR__ . "/../Reflection/CodeFile.php";
+
self::registerPSR4("Keruald\\OmniTools\\", self::getLibraryPath());
}
public static function getLibraryPath () : string {
return dirname(__DIR__);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Sep 19, 00:07 (12 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2991941
Default Alt Text
(1 KB)

Event Timeline