Download the PHP package sw2eu/hotplug without Composer

On this page you can find all versions of the php package sw2eu/hotplug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hotplug

Hotplug - super simple plugins for Nette

Nette has not any plugin or bundle management. If you want to split your application into multiple modules, you probably use the includes section of configuration files. This library will help you simplify this problem with a nice and simple way.

Requirements

This library requires PHP 5.4 or higher. Hotplug is designed for Nette Framework currently for versions 2.3 and 2.4 (for more informations see releases).

Installation

The best way to install this library is using Composer:

Documentation

Firstly, you will use Hotplug configurator in your bootstrap file instead of classic Nette\Configurator:

Now you can define your plugin directory. I use slightly different structure, but it is fully configurable:

The hotplug configurator will search for any config/hotplug.neon in defined directory. For exaple:

This search is cached, so it is processed only first time when you build container. If you want to add new plugin, you have to manually delete hotplug cache (in file temp/cache/_Sw2.Hotplug).

That's all! Now you can define your plugin.

Plugin Definition

Every plugin must have defined configuration file hotplug.neon. In this file, you work like in any configuration file for Nette framework (maybe you can read configuration section in documentation).

You can also use variable %pluginDir% for locating files in your plugin directory, for example assets.

Router Helpers

If you need add new router for your plugin, it is also supersimple. Hotplug is ready for this problem. In your application config define main application router like this:

Hotplug RouterFactory will search for any service with tag router. If you need to ensure sort of the routers, just name by alphabetic order. Or you can use naming conventions with sort number like this:

Do not forget to set autowired to FALSE! If you need to add multiple routers and you want to define as RouteList, this library has a shortcut class Sw2\Hotplug\Routers\RouteList for this case:


All versions of hotplug with dependencies

PHP Build Version
Package Version
Requires nette/application Version ^2.3
nette/bootstrap Version ^2.3
nette/caching Version ^2.3
nette/finder Version ^2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sw2eu/hotplug contains the following files

Loading the files please wait ....