pxgamer / minimin
A modular php interface for server management.
Fund package maintenance!
owenvoke
ecologi.com/owenvoke?gift-trees
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 1
Type:project
Requires
- php: ^7.1
- nezamy/route: ^1.0
- smarty/smarty: ^3.1
Requires (Dev)
- phpunit/phpunit: ^6.4
- squizlabs/php_codesniffer: ^3.1
This package is auto-updated.
Last update: 2024-11-11 14:26:28 UTC
README
A modular php interface for server management.
Structure
public/
src/
tests/
vendor/
Install
Via Composer
$ composer create-project pxgamer/minimin
Usage
Basic Plugin format
Classes accessible to plugins:
- Smarter (this will need to have a custom template directory added using
addTemplateDir()
) - System* (
nezamy/route
classes) - Any classes that they import/require
Packages should follow the folder structure below:
/
src/
/Templates
/{PluginName}
App.php
Plugin.php
composer.json
For reference, view the minimin-package-example plugin on Github.
App.php
<?php namespace {vendor}\{plugin}; use pxgamer\Minimin\Smarter; class App { // When initialised by the Minimin class, it will pass the $route to the plugin App constructor public function __construct($route) { // ... Run plugin commands $Smarter = Smarter::get(); $Smarter->addTemplateDir(__DIR__ . '/Templates/'); } }
Plugin.php
<?php namespace {vendor}\{plugin}; class Plugin { public static function info() { /** This function MUST return the following values: * - app_namespace * - name * - link * - description */ $object = (object)[ 'app_namespace' => '\\{vendor}\\{plugin}', // The namespace of the plugin 'name' => 'Cron Tasks', // The name of the plugin, may contain spaces 'link' => 'cron-tasks', // The link that will be used (e.g. `cron-tasks` will be `/cron-tasks`) 'description' => 'A cron task manager for servers.' // The description of the plugin ]; return $object; } }
Example data/plugins.json
format
[ { "app_namespace": "\\pxgamer\\CronTasks", "name": "Cron Tasks", "link": "cron-tasks", "description": "A cron task manager for servers." } ]
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.