Download the PHP package mahdyaslami/simple-pluginable without Composer
On this page you can find all versions of the php package mahdyaslami/simple-pluginable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahdyaslami/simple-pluginable
More information about mahdyaslami/simple-pluginable
Files in mahdyaslami/simple-pluginable
Package simple-pluginable
Short Description Functions that make simple pluginable.
License MIT
Informations about the package simple-pluginable
simple-pluginable
This package allows other packages to make these changes at minimal cost if they need to change the structure of the project folder.
Installation
- Add following script to your project
composer.json
file.
This script will run after dump autoload command and start process of changing workspaces.
- Install
simple-pluginable
package.
Process
Pluginable runs after the dumpautoload
command and checks all packages and executes the installer.php
file if it exists.
Installer(installer.php
) of packages will update project workspace.
Pluginable prevents a plugins from being installed twice and after installing all the plugins, they save them in the plugins.json file in the project root directory.
How create a plugin?
It's simple. you need to only create your package and we prepare some options that helps you to install your workspace.
Installer
Create install.php
file on root of your package (don't use it on composer.json->autoload
). and finally write your installation script.
You can use Simplex\Plugins\Installer::basePath
for knowing where is workspace.
If you just want to copy some file you can create a folder with workspace
name and put your structure there. and finally add following code on your installer: