Autoloader
class Autoloader
This class offer SPL Autoloader for any PSR-4 namespace or for this library itself.
Methods
Register an autoloader for a PSR-4 namespace, enabling fosr classes traits and interfaces in that namespace to be automatically loaded if they are not yet defined.
Register the Keruald OmniTools PSR-4 classes.
Gets the Keruald OmniTools library path.
Details
at line 24
static void
registerPSR4(string $namespace, string $path)
Register an autoloader for a PSR-4 namespace, enabling fosr classes traits and interfaces in that namespace to be automatically loaded if they are not yet defined.
at line 50
static void
selfRegister()
Register the Keruald OmniTools PSR-4 classes.
This method is convenient when you don't use Composer or any other mechanism.
For example if you've put the library in your includes/ directory:
use Keruald\OmniTools\Registration\Autoloader as KerualdLoader;
require_once "includes/omnitools/Registration/Autoloader.php";
KerualdLoader::selfRegister();
You don't need to use this method if you already use a PSR-4 compatible autoloader like Composer + require vendor/autoload.php.
at line 67
static string
getLibraryPath()
Gets the Keruald OmniTools library path.
The path matches a PSR-4 namespace for Keruald\OmniTools.