Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11726066
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Sep 19, 00:07 (23 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2991941
Default Alt Text
(1 KB)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment