- Version 3.x
- Version 2.x
The packages were introduced in the version 3 of Jaxon. They provide a complete set of features to a Jaxon based application, which users can access within a dedicated page.
The unique advantage of Jaxon packages is that they contain all the components required to implement the features they aim to provide, including frontend and backend, while still being compatible with any PHP framework or application.
A package is installed with
Composer, like any other Jaxon plugin.
The configuration of a package is defined in the
app section of the Jaxon configuration. The key is the name of the package main class, and the parameters depend on the package features.
Here's an example configuration of the jaxon-supervisor package.
'app' => [ // Other config options // ... 'packages' => [ Lagdo\Supervisor\Package::class => [ 'servers' => [ 'first_server' => [ 'url' => 'http://192.168.1.10', 'port' => '9001', ], 'second_server' => [ 'url' => 'http://192.168.1.11', 'port' => '9001', ], ], ], ], ],
The instance of the package main class is returned by a call to
jaxon()->package($packageClassName). The HTML code is returned by the
getHtml() method. When the