2017 © Pedro Peláez
 

library minwork

Minwork - Simple yet powerful PHP 7.1 framework

image

minwork/minwork

Minwork - Simple yet powerful PHP 7.1 framework

  • Saturday, July 28, 2018
  • by minwork
  • Repository
  • 1 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 36 Versions
  • 125 % Grown

The README.md

Minwork - PHP Framework

Disclaimer

Currently minwork framework is in alpha stage and can have breaking changes between releases, which also means that examples may be out of date., (*1)

It is not recommended to use it in production environment, but if you still want to, then specify exact library version to avoid updates that can break your application., (*2)

What is Minwork?

Minwork is a PHP 7 micro framework designed to be fast, compact, easy to use, with interchangeable modules., (*3)

Main advantages of Minwork are: - Flexible - every part of the framework can be replaced with your own as long as it implements specified interface - Event based - all major actions trigger corresponding events for easy hooking and modifying application flow - Operations - model utilizes command design pattern which allows to execute, queue and revert any CRUD operation - Fast - due to light weight, small and simple modules with only most necessary functionality as well as no external dependencies Minwork is incredibly fast - Minimum effort - you can create basic application under 1 minute with less than 15 lines of code - PHP 7 - utilizes every benefit of PHP 7 to make your work even smoother and more comfortable - IDE friendly - everything you need to know about any module or method is well documented using PHPDoc, (*4)

Example

This is how to create simple Hello World application, (*5)

<?php
require 'vendor/autoload.php';

use Minwork\Core\Framework;
use Minwork\Http\Utility\Environment;
use Minwork\Http\Object\Router;
use Minwork\Basic\Controller\Controller;

$controller = new class() extends Controller {
  public function show() {
    return 'Hello world!';
  }
};
$framework = new Framework(new Router(['test' => $controller]), new Environment());
$framework->run('/test');

But what if we want to parse real website url? In that case you will need .htaccess file with content as follows, (*6)

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?URL=$1 [L,QSA]

And your index.php should look like this, (*7)

<?php
require 'vendor/autoload.php';

use Minwork\Core\Framework;
use Minwork\Http\Utility\Environment;
use Minwork\Http\Object\Router;
use Minwork\Basic\Controller\Controller;

$controller = new class() extends Controller {
    public function show($name)
    {
        return "Hello {$name}!";
    }
};
$framework = new Framework(new Router(['default_controller' => $controller]), new Environment());
$framework->run($_GET['URL']);

Because show is default controller method, as a result of calling address http://yourwebsitename.com/John framework will output Hello John!, (*8)

If you want output to be returned instead of printed just change last line to $content = $framework->run($_GET['URL'], true);, (*9)

The Versions

28/07 2018

dev-master

9999999-dev

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7 mini

28/07 2018

v0.9.2.3

0.9.2.3

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

22/06 2018

v0.9.2.2

0.9.2.2

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

16/06 2018

v0.9.2.1

0.9.2.1

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

14/06 2018

v0.9.2

0.9.2.0

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

26/01 2018

v0.9.1

0.9.1.0

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

17/12 2017

v0.9.0

0.9.0.0

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

12/10 2017

v1.1.1

1.1.1.0

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

12/10 2017

v0.8.1

0.8.1.0

Minwork - Simple yet powerful PHP 7.1 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

api micro framework php simple minimal php 7.1 php 7

12/10 2017

v1.1.0

1.1.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

12/10 2017

v0.8.0

0.8.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

07/06 2017

v1.0.2

1.0.2.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

07/06 2017

v0.7.2

0.7.2.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

17/05 2017

v1.0.1

1.0.1.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

17/05 2017

v0.7.1

0.7.1.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

30/04 2017

v1.0.0

1.0.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

30/04 2017

v0.7.0

0.7.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

30/04 2017

v0.6.0

0.6.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

29/04 2017

v0.5.0

0.5.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

29/04 2017

v0.4.0

0.4.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

29/04 2017

v0.3.0

0.3.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

27/04 2017

v0.2.7

0.2.7.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

27/04 2017

v0.2.6

0.2.6.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.5

0.2.5.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.4

0.2.4.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.3

0.2.3.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.2

0.2.2.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.1

0.2.1.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.2.0

0.2.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

26/04 2017

v0.1.0

0.1.0.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

24/04 2017

v0.0.2

0.0.2.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

24/04 2017

v0.0.1

0.0.1.0

Minwork - PHP 7 framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

framework php php 7

04/01 2017

dev-develop

dev-develop

Minwork - PHP 7 micro framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

micro framework minimal fast php 7 compact mini work

27/07 2016

v1.0

1.0.0.0

Minwork - PHP 7 micro framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

micro framework minimal fast php 7 compact mini work

26/07 2016

v0.9

0.9.0.0

Minwork - PHP 7 micro framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

micro framework minimal fast php 7 compact expansible

26/07 2016

v0.9-alpha

0.9.0.0-alpha

Minwork - PHP 7 micro framework

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Christopher Kalkhoff

micro framework minimal fast php 7 compact mini work