Commit 2f98bc91 authored by Igor Wiedler's avatar Igor Wiedler

delete example.php, README contains a sufficient example

parent 5ecfcbe1
<?php
require_once __DIR__.'/silex.phar';
use Symfony\Component\HttpFoundation\Request;
use Silex\Framework;
$hello = function($name)
{
return "Hello $name";
};
$goodbye = function($name)
{
return "Goodbye $name";
};
$framework = new Framework(array(
'GET /hello/:name' => $hello,
'POST /goodbye/:name' => $goodbye,
));
// Simulate a hello request without a Client
//$request = Request::create('/hello/Fabien');
//$framework->run($request);
// Simulate a goodbye request without a Client
//$request = Request::create('/goodbye/Fabien', 'post');
//$framework->run($request);
$framework->run();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment