2017 © Pedro Peláez
 

library lift-framework

Lift is a PHP 7 micro framework for building microservices

image

jasonmichels/lift-framework

Lift is a PHP 7 micro framework for building microservices

  • Tuesday, June 7, 2016
  • by jasonmichels
  • Repository
  • 2 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Lift - PHP 7 micro framework

Introduction

Lift is an opinionated PHP 7 micro framework, (*1)

Example

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

use Lift\Framework\App;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Lift\Framework\Http\Response;

function getHomepage(Request $request): JsonResponse {
    $response = Response\json();
    $response->setData(['data' => ['stuff' => 'is awesome']]);
    return $response;
}

function getUserHandler (Request $request, array $args): JsonResponse {
    $response = Response\json();
    $response->setData(['data' => ['userId' => $args['id'], 'username' => 'Jason Michels']]);
    return $response;
}

$app = new App();

$routes = [
    ['httpMethod' => Request::METHOD_GET, 'route' => '/', 'handler' => 'getHomepage'],
    ['httpMethod' => Request::METHOD_GET, 'route' => '/user/{id:\d+}', 'handler' => 'getUserHandler']
];

$app->run($routes);

Testing

$ phpunit
  • Be Awesome!

Language

  • PHP 7

License

GroundworkPHP is open-sourced software licensed under the MIT license, (*2)

Authors

  • Jason Michels

The Versions

07/06 2016

dev-master

9999999-dev

Lift is a PHP 7 micro framework for building microservices

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jason Michels

framework php php7 lift

07/06 2016

dev-develop

dev-develop

Lift is a PHP 7 micro framework for building microservices

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jason Michels

framework php php7 lift

07/06 2016