A PHP micro-framework.
<?php
$app = new yoshi\Application();
$app->get('/hello/{name}', function ($name) {
echo "Hello, $name!";
});
$app->run();
?>
Yoshi requires PHP 5.6.
- HTTP Routing (supported methods: GET, POST, UPDATE, DELETE, HEAD & OPTIONS)
- Views & View Helpers (only UrlHelper included right now)
- Custom Error Views
- Application & Route Filters
- Authentication Helper
- Error Handling (e.g. Views render -> view not found)
- Set HTTP Headers inside route callbacks
- Enable filter to end route processing
- Request object injection collides with default values for arguments
Yoshi is nothing new. There are already some good PHP micro frameworks out there. I started Yoshi mainly for fun and to dig deeper into the development of a web framework.
Here's a list of similar PHP micro frameworks:
- Installation using composer
- Using views
- Global variables
- Using callback methods for helpers (arrays vs. callback function objects)
- Redirect using headers
Yoshi is released under the MIT License.