peakframework/framework

A lightweight and modular micro-framework based on a middleware architecture (PSR-4, PSR-7, PSR-15, PSR-17).

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.2 2020-11-09 19:37 UTC

This package is auto-updated.

Last update: 2020-11-09 19:40:05 UTC


README

A lightweight and modular micro-framework based on a middleware architecture (PSR-4, PSR-7, PSR-15, PSR-17).

Basic usage

<?php

use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7Server\ServerRequestCreator;
use Peak\Application;

require __DIR__ . '/vendor/autoload.php';

$psr17Factory = new Psr17Factory();
$request = (new ServerRequestCreator($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory))->fromGlobals();

$app = new Application($request, $psr17Factory);

// You must write your application code here

$app->run();

Documentation

You can consult the documentation on the official website of Peak.