1. Go to this page and download the library: Download siratik/package-loader library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
siratik / package-loader example snippets
// version.php
return '1.4.2';
// register.php — listed under autoload.files in composer.json
use Siratik\PackageLoader\Registry;
if (class_exists(Registry::class, false)) {
Registry::instance()->register([
'package' => 'acme/widgets',
'version' => (string)
if (! function_exists('acme_widgets_render')) {
function acme_widgets_render(...$args) {
return \Acme\Widgets\API::render(...$args);
}
}
// In the mu-plugin, from your own bundled copy:
ackage classes now resolve exactly as they will after plugins_loaded.
}
$registry = \Siratik\PackageLoader\Registry::instance();
$registry->version('acme/widgets'); // version that won this request
$registry->candidates('acme/widgets'); // every registered copy: root path => version
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.