Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12373669
Autoloader.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
887 B
Referenced Files
None
Subscribers
None
Autoloader.php
View Options
<?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-php
Expires
Sat, Nov 1, 18:10 (23 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3121715
Default Alt Text
Autoloader.php (887 B)
Attached To
Mode
rKOT Keruald OmniTools
Attached
Detach File
Event Timeline
Log In to Comment