jasonmichels/groundworkphp

GroundworkPHP is a PHP 7 micro framework

0.3.0 2016-01-15 18:27 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:08:36 UTC


README

GroundworkPHP - PHP 7 micro framework

Introduction

GroundworkPHP is a PHP 7 micro framework

Example

declare(strict_types=1);
require('../vendor/autoload.php');

use GroundworkPHP\Framework\App;
use GroundworkPHP\Framework\Http\Router;
use Symfony\Component\HttpFoundation\JsonResponse;

$httpMethod = $_SERVER['REQUEST_METHOD'];
$uri = rawurldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));

$app = new App($uri, $httpMethod, new Router());

$app->get('/', function (JsonResponse $response) {
    $response->setData(['data' => ['stuff' => 'awesome']]);
    return $response;
});

$app->run();

Testing

$ phpunit
  • Be Awesome!

Language

  • PHP 7

License

GroundworkPHP is open-sourced software licensed under the MIT license

Authors

  • Jason Michels