2017 © Pedro Peláez
 

library respond

image

respond/respond

  • Thursday, October 1, 2015
  • by rickysu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

respond

Fast, async I/O web framework for php, (*1)

Example, (*2)

app.php, (*3)

<?php
use WebUtil\Http\Request\ServerRequest;

$app = new Respond\App\WebApp();

return $app->listen('0.0.0.0', 8080)
    ->get('/{id:\\d+}', function(ServerRequest $request){
        return "match id with {$request->getAttribute('id')}";
    })
    ->post('/{id:\\d+}.html', function(ServerRequest $request){
        return "match id.html {$request->getAttribute('id')}";
    })
    ->request(['GET', 'POST'], '/{id:\\d+}-{id2:\\d+}.html', function(ServerRequest $request){
        return $request->getAttribute('id');
    })
    ->defaultRequest(function(ServerRequest $request){
        return 'default';
    });

Execute, (*4)

bin/respond app.php

The Versions

01/10 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Ricky Su