jabernardo / calf
A slim router for PHP Web Applications
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/jabernardo/calf
Requires
- php: >=7.0
- jabernardo/saddle: ^0.1.0
Requires (Dev)
- phpunit/phpunit: ^6.0
This package is auto-updated.
Last update: 2025-10-29 02:22:45 UTC
README
Yet another Micro-framework for PHP.
Installation
composer require jabernardo/calf
Hello World
<?php require("vendor/autoload.php"); $app = new \Calf\App(); $home = new \Calf\HTTP\Route('/', function($req, $res) { return $res->write('Hello World!'); }); $app->add($home); $app->run();
Configuring Web Server
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L]
Running...
php -S localhost:8888 index.php
Testing
phpunit
Learn more
Please see the project's wiki page here.
License
The calf is open-sourced software licensed under the MIT license.