Skip to content
A modular php interface for server management.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
src
.editorconfig
.gitattributes
.gitignore
.styleci.yml
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

minimin

Latest Version on Packagist Software License Build Status Style CI Code Coverage Total Downloads

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.

You can’t perform that action at this time.