holger/yoshi

A PHP micro-framework

dev-master 2017-09-13 08:46 UTC

This package is not auto-updated.

Last update: 2024-05-11 10:51:41 UTC


README

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.

Features

  • HTTP Routing (supported methods: GET, POST, UPDATE, DELETE, HEAD & OPTIONS)
  • Views & View Helpers (only UrlHelper included right now)
  • Custom Error Views
  • Application & Route Filters

Open Issues

  • 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

Similar PHP micro frameworks

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:

Doku

  • Installation using composer
  • Using views
  • Global variables
  • Using callback methods for helpers (arrays vs. callback function objects)
  • Redirect using headers

License

Yoshi is released under the MIT License.