2017 © Pedro Peláez
 

library minibase

Minimal extensible framework for PHP - done right.

image

minibase/minibase

Minimal extensible framework for PHP - done right.

  • Saturday, May 11, 2013
  • by peec
  • Repository
  • 1 Watchers
  • 4 Stars
  • 79 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Minibase (PHP 5.4+)

Minibase is a framework for RESTful PHP applications, based on Event Driven Architecture. Minibase is what a framework should do, it gives you a minimum base to extend on as you go. Plugins can be downloaded from anywhere and included easily., (*2)

Minibase is not fullstack, but with plugins it is., (*3)

For a fullstack framework see the Sample Minibase App. The sample app contains some architecture using best practices and includes some plugins to show the capabilities of Minibase., (*4)

Configurable

We use JSON for configuration files, because its known, easy and good performance. You can create a routes.json file and put your route binding there. You can create a app.json file and put app configuration there. For those who likes the programmatic way of binding these things you don't have to use configuration files., (*5)

Extensible

Minibase uses event based architecture with a simple on / trigger system. Using Minibase Plugin system along with the Events makes it easy to create standalone plugins., (*6)

Event based architecture makes this framework stand out, all kinds of plugins can be created. Also it's easy. Take a look at 3rdparty plugins to see some plugins that are already created for those who are looking for forexample Twig templating engine, and Doctrine ORM support., (*7)

Install

You can install Minibase with Composer, if you are not using composer, start using it., (*8)

  1. Install composer.
  2. Create composer.json and put a require dependency.
{
    "require": {
        "minibase/minibase": "dev-master"
    }
}
  1. Run composer install

Documentation.

  • Minibase: Configure the Minibase object.
  • Routing: See how to do routing, reverse routing and such.
  • Events: Minibase events, listen to these to extend minibase.
  • Commandline: Minibase includes symfony CLI, CLI and also be extended with custom commands.
  • Plugins: Create your own plugins publish them to composer and share.
  • 3rdparty plugins: Browse plugins to extend minibase.
  • Internationalization: I18n for your apps with gettext. Full workflow control.
  • Assetic: Manage your assets!

Simple (if you want)

If you really want no OO-code you can create your apps really fast. Note, there are also OO-way of routing using Controller.method approach. See more about Routing., (*9)

Creating your app in ~11 lines of code, (*10)

    require 'vendor/autoload.php'; // Include composer autoloader

    $mb = \Minibase\MB::create(); // Create one application object.

    // Add a route for your homepage
    $mb->route("get", "/", function () {
        // some logic.
        // And return a HtmlResponse object
        return $this->respond("html")->view("views/test.html.php");
    });

    // Start the router engine.
    $mb->start();

The Versions

18/04 2013

v1.0.0-alpha

1.0.0.0-alpha http://github.com/peec/minibase

Minimal extensible framework for PHP - done right.

  Sources   Download

MIT

The Requires

  • php >=5.4.0