Absorb pocketmine/classloader into the core code

the only use for this class is to facilitate random runtime plugin loading, and it's not complete even for that purpose.

Since nothing but PM uses pocketmine/classloader anyway, it doesn't make sense to have it outside the core. As with LogPthreads, it's just adding more maintenance work.
This commit is contained in:
Dylan K. Taylor
2023-05-22 22:52:43 +01:00
parent d2c34615f5
commit 4aba9d9725
9 changed files with 199 additions and 60 deletions

View File

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace pocketmine\plugin;
use pocketmine\thread\ThreadSafeClassLoader;
use function is_file;
use function str_ends_with;
@ -31,7 +32,7 @@ use function str_ends_with;
*/
class PharPluginLoader implements PluginLoader{
public function __construct(
private \DynamicClassLoader $loader
private ThreadSafeClassLoader $loader
){}
public function canLoadPlugin(string $path) : bool{