cawaphp / cawa
Сáша Framework
Requires
- php: ~7.1
- ext-intl: *
- ext-mbstring: *
- behat/transliterator: ~1.1
- cakephp/chronos: ^1.0
- giggsey/libphonenumber-for-php: ~8.1
- jeremykendall/php-domain-parser: ~5.1
- nesbot/carbon: ~1.33
- psr/log: ~1.0
- punic/punic: ~3.1
- symfony/translation: ~4.0
Requires (Dev)
- phpunit/phpunit: ~7.0
This package is not auto-updated.
Last update: 2023-12-23 14:46:39 UTC
README
PHP7 Hmvc framework built for performance & simplicity
Сáша is a full HMVC framework for PHP. It was built with 2 concept in mind : Simplicity & Performance.
Performance : Everything is timed in order to find bottleneck quickly.
Simplicity : I make some questionable choice in order to avoid too much abstractions. Too many abstraction tends to have a lot of php class / interface loaded and since PHP is born to died at every request, compilation/running time (even with opcache) will be slow.
Warning
Be aware that this package is still in heavy developpement. Some breaking change will occure. Thank's for your comprehension.
Installation
Install the latest version with
$ composer require cawa/cawa
Basic Usage
use Cawa\Core\HttpApp; use Cawa\Router\Route; putenv('APP_ENV=' . HttpApp::DEVELOPMENT); $app = HttpApp::create(__DIR__); $app->init(); HttpApp::router()->addRoutes([ Route::create()->setName("main")->setMatch("/{{O:<name>[A-Za-z0-9]+}}")->setController(function(array $args = array()) { return "Hello " . ($args["name"] ?? "Guest"); }), ]); $app->handle(); $app->end();
Features
- HMVC framework : Because simple MVC sucks
- Template : PhtmlTrait & Twig template engine support
- Http Router : strict type http router, with localized url, controller & callback
- Error Handler : catch all error with pretty html output
- Intl & l18n : really simple key value store v
- Events : because events is cool & help put timer on all your application
- Db : Abstraction layer without realiying on PDO
- HttpClient : a really simple http client that just work
- Cache : Redis & Apc cache abstraction
- Log : PSR3 logger with syslog handler (others coming asap)
- Session : file session (db, ... coming asap) without using the php session handler
- Collection : filerable, sortable with callable
- Email : with Swift_Mailer as backend
- Date : with Carbon as backend
About
Performance
My first bench can run a simple hello world at 6k queries per second. In the same hardware, I ran symfony3 simple hello world app at 350 queries per second.
Plan is to support one of these lib in order to bosst performance:
Requirements
License
Cawa is licensed under the GPL v3 License - see the LICENSE
file for details