Very thin, no-framework PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
README.md
composer.json

README.md

Wafer

Simple, very thin, no-framework PHP.

Install

Via composer

composer require ideationnet/wafer

Usage

The simplest way to use this is to create an "invokable":

<?php
use Zend\Diactoros\Response\HtmlResponse;
class Hello
{    
    public function __invoke()
    {
        return new HtmlResponse('Hello!');
    }
}

And then just run it by creating an index.php:

<?php

use IdNet\Wafer\Application;
use Example\Hello;

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

Application::run([

    'routes' => [
      ['GET', '/', Hello::class]
    ]

]);