{"id":24408591,"url":"https://github.com/jenstornell/php-plugin-loader","last_synced_at":"2025-06-30T22:06:08.312Z","repository":{"id":217043560,"uuid":"182444092","full_name":"jenstornell/php-plugin-loader","owner":"jenstornell","description":"A plugin loader for any project","archived":false,"fork":false,"pushed_at":"2019-06-22T12:59:20.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T09:27:25.631Z","etag":null,"topics":["php","plugin","plugin-loader","plugins"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenstornell.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-04-20T19:00:11.000Z","updated_at":"2022-02-10T15:08:50.000Z","dependencies_parsed_at":"2024-01-14T08:12:21.363Z","dependency_job_id":"f79948a5-d96b-4b88-8ed7-b2eccf191a89","html_url":"https://github.com/jenstornell/php-plugin-loader","commit_stats":null,"previous_names":["jenstornell/php-plugin-loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jenstornell/php-plugin-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fphp-plugin-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fphp-plugin-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fphp-plugin-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fphp-plugin-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenstornell","download_url":"https://codeload.github.com/jenstornell/php-plugin-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fphp-plugin-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262857266,"owners_count":23375491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","plugin","plugin-loader","plugins"],"created_at":"2025-01-20T05:52:18.738Z","updated_at":"2025-06-30T22:06:08.277Z","avatar_url":"https://github.com/jenstornell.png","language":"PHP","funding_links":["https://www.paypal.me/DevoneraAB"],"categories":[],"sub_categories":[],"readme":"# PHP Plugin Loader\n\n*Version 1.1*\n\nIf you are making some kind of tool, you may want a plugin loader.\n\n## In short\n\n- Very small\n- Includes and excludes support\n- Will skip hidden plugins prefixed with _\n- You can control the plugin load order\n\n## Setup\n\nInclude the file to the library. Create a class instance.\n\n1. The first argument should be the path to the plugin folder.\n1. The second argument should be plugins that will always be excluded.\n\n```php\n\u003c?php\ninclude __DIR__ . '/lib/php-plugin-loader.php';\n\n$load = new PluginLoader(__DIR__ . '/plugins', ['first']);\n```\n\n## Usage\n\n### Include\n\nUse the folder names of the plugins as arguments. The code below will load the plugins `third`, `second` and `forth` in that exact order. The plugin `first` will be skipped because it's excluded in the setup.\n\n```php\n$load-\u003eload('third', 'second');\n$load-\u003eload('first', 'forth');\n```\n\n### Exclude\n\nIf you don't set any plugins to be included, it will load all the plugins that are not excluded. If we don't run the include example above, this example will load all the plugins except `second`.\n\n```php\n$load-\u003eload('!second');\n```\n\n### Prefix to exclude\n\nAnother alternative to exclude a plugin is to use the `_` as a prefix. If you name a plugin folder `_fourth`, then it will be excluded.\n\n## Donate\n\nDonate to [DevoneraAB](https://www.paypal.me/DevoneraAB) if you want.\n\n## Requirements\n\n- PHP 7\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenstornell%2Fphp-plugin-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenstornell%2Fphp-plugin-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenstornell%2Fphp-plugin-loader/lists"}