Commit 919c32c7 authored by WouterJ's avatar WouterJ

Some doc fixes

parent 7ae0fd8b
......@@ -2,7 +2,7 @@ Introduction
============
Silex is a PHP microframework for PHP 5.3. It is built on the shoulders of
Symfony2 and Pimple and also inspired by sinatra.
Symfony2 and Pimple and also inspired by Sinatra_.
A microframework provides the guts for building simple single-file apps. Silex
aims to be:
......@@ -18,10 +18,12 @@ aims to be:
In a nutshell, you define controllers and map them to routes, all in one step.
**Let's go!**::
Usage
-----
// web/index.php
.. code-block:: php
// web/index.php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
......@@ -35,14 +37,21 @@ In a nutshell, you define controllers and map them to routes, all in one step.
All that is needed to get access to the Framework is to include the
autoloader.
Next we define a route to ``/hello/{name}`` that matches for ``GET`` requests.
Next a route for ``/hello/{name}`` that matches for ``GET`` requests is defined.
When the route matches, the function is executed and the return value is sent
back to the client.
Finally, the app is run. Visit ``/hello/world`` to see the result. It's really
that easy!
Installing Silex is as easy as it can get. `Download`_ the archive file,
extract it, and you're done!
Installation
------------
Installing Silex is as easy as it can get. The recommend method is using
Composer_ and requiring `silex/silex`_. Another way is to `download`_ the
archive file and extract it.
.. _Download: http://silex.sensiolabs.org/download
.. _Sinatra: http://www.sinatrarb.com/
.. _Composer: http://getcomposer.org/
.. _`download`: http://silex.sensiolabs.org/download
.. _`silex/silex`: https://packagist.org/packages/silex/silex
This diff is collapsed.
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