Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
717e1453
Commit
717e1453
authored
Jan 06, 2011
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use proper markdown in README, use new syntax and error handler in example
parent
6c08bd25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
23 deletions
+20
-23
README.md
README.md
+20
-23
No files found.
README.md
View file @
717e1453
Silex, a simple Web Framework
=============================
# Silex, a simple Web Framework
Silex is a simple web framework to develop simple websites:
...
...
@@ -7,45 +6,43 @@ Silex is a simple web framework to develop simple websites:
use Silex\Framework;
$framework = new Framework(array(
'/hello/:name' => function($name)
{
return "Hello $name";
},
'GET|PUT|POST /goodbye/:name' => function($name)
{
return "Goodbye $name";
},
));
$app = Framework::create();
$framework->run();
$app->get('/home/:name', function($name) {
return "Hello $name";
});
$app->match('/goodbye/:name', function($name) {
return "Goodbye $name";
});
$app->error(function($e) {
return "An error occured<br />" . $e->getMessage();
});
$app->run();
Silex is based on
[
Symfony2
][
1
]
.
Requirements
------------
## Requirements
Silex works with PHP 5.3.2 or later.
Installation
------------
## Installation
Installing Silex is as easy as it can get. Download the
[
`Silex.phar`
][
2
]
file
and you're done!
Test Suite
----------------
## Test Suite
You can run the
[
PHPUnit
][
3
]
test suite by running
`phpunit`
.
More Information
----------------
## More Information
Read the documentation of Symfony2 for more information about how you can
leverage Symfony2 features.
License
-------
## License
Silex is licensed under the MIT license.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment