PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
addPath (string $namespacePrefix, string $path, bool $prepend=false) | |
findClass (string $name) | |
loadClass (string $name) | |
register (bool $prepend=false) | |
Protected Member Functions | |
appendOrPrependLookupEntry (ThreadSafeArray $list, string $entry, bool $prepend) | |
getAndRemoveLookupEntries (ThreadSafeArray $list) | |
normalizePath (string $path) | |
This autoloader can be used and updated from multiple threads. Useful if classes need to be dynamically added after threads have already been started.
This is used to facilitate loading plugin classes, enabling plugins to be loaded after the server has started.
Definition at line 48 of file ThreadSafeClassLoader.php.
pocketmine\thread\ThreadSafeClassLoader::__construct | ( | ) |
Definition at line 61 of file ThreadSafeClassLoader.php.
pocketmine\thread\ThreadSafeClassLoader::addPath | ( | string | $namespacePrefix, |
string | $path, | ||
bool | $prepend = false ) |
Definition at line 74 of file ThreadSafeClassLoader.php.
|
protected |
@phpstan-param ThreadSafeArray<int, string> $list
Definition at line 95 of file ThreadSafeClassLoader.php.
References pocketmine\thread\ThreadSafeClassLoader\getAndRemoveLookupEntries().
pocketmine\thread\ThreadSafeClassLoader::findClass | ( | string | $name | ) |
Returns the path for the class, if any
Definition at line 151 of file ThreadSafeClassLoader.php.
|
protected |
@phpstan-param ThreadSafeArray<int, string> $list @phpstan-return list<string>
Definition at line 113 of file ThreadSafeClassLoader.php.
Referenced by pocketmine\thread\ThreadSafeClassLoader\appendOrPrependLookupEntry().
pocketmine\thread\ThreadSafeClassLoader::loadClass | ( | string | $name | ) |
Called when there is a class to load
Definition at line 130 of file ThreadSafeClassLoader.php.
|
protected |
Definition at line 66 of file ThreadSafeClassLoader.php.
pocketmine\thread\ThreadSafeClassLoader::register | ( | bool | $prepend = false | ) |
Definition at line 121 of file ThreadSafeClassLoader.php.