Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaeken/plugin-system
Plugin system for your PHP projects
https://github.com/isaeken/plugin-system
composer extension extension-system library packagist php php-plugin-system plugin plugin-system
Last synced: 3 months ago
JSON representation
Plugin system for your PHP projects
- Host: GitHub
- URL: https://github.com/isaeken/plugin-system
- Owner: isaeken
- License: mit
- Created: 2020-10-31T15:13:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T17:36:10.000Z (over 2 years ago)
- Last Synced: 2024-07-08T04:18:50.645Z (7 months ago)
- Topics: composer, extension, extension-system, library, packagist, php, php-plugin-system, plugin, plugin-system
- Language: PHP
- Homepage: https://isaeken.github.io/plugin-system/
- Size: 110 KB
- Stars: 21
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Plugin System
![Plugin System](https://banners.beyondco.de/Plugin%20System.png?theme=light&packageManager=composer+require&packageName=isaeken%2Fplugin-system&pattern=architect&style=style_1&description=Make+plugins+to+your+script+and+make+it+flexible.&md=1&showWatermark=1&fontSize=100px&images=puzzle)
Make and add own plugins to your script and make it flexible
[![run-tests](https://github.com/isaeken/plugin-system/actions/workflows/run-tests.yml/badge.svg)](https://github.com/isaeken/plugin-system/actions/workflows/run-tests.yml)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/github/isaeken/plugin-system)
![GitHub](https://img.shields.io/github/license/isaeken/plugin-system)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/isaeken/plugin-system)
![Packagist Version](https://img.shields.io/packagist/v/isaeken/plugin-system)## Features
- Execute specific function for plugin(s) at the synchronously
- Execute methods using arguments
- Enable, disable or load plugins in runtime
- Track method execution times## Installation
Install plugin-system with composer
```bash
composer require isaeken/plugin-system
```### Publish service provider and configs (Laravel)
```bash
php artisan vendor:publish --provider="IsaEken\PluginSystem\PluginSystemServiceProvider"
```Set your configuration
```php
// config/plugins.php
base_path('plugins'),
'namespace' => '',
];
```Add service provider to ``config/app.php``
```php
\IsaEken\PluginSystem\PluginSystemServiceProvider::class
```## Usage
```php
$pluginSystem = new \IsaEken\PluginSystem\PluginSystem();
$pluginSystem->load(__DIR__ . '/plugins');
$pluginSystem->handle();
```### Laravel
```php
app('plugins')->handle();
```## Running Tests
To run tests, run the following command
```bash
composer run test
```## Documentation
[Documentation](https://isaeken.github.io/plugin-system)
## Feedback & Support
If you have any feedback, please reach out to us at [email protected]
## Authors
- [@isaeken](https://www.github.com/isaeken)
## License
[MIT](LICENSE.md)