edwindayot / shorty-framework
A test framework
dev-master
2017-10-26 14:30 UTC
Requires
- php: ^7.1
- filp/whoops: 2.1.12
- guzzlehttp/psr7: 1.4.2
- http-interop/response-sender: 1.0.0
- php-di/php-di: 6.0.x-dev
- symfony/dotenv: 3.4.x-dev
- symfony/var-dumper: 3.4.x-dev
Requires (Dev)
- phpunit/phpunit: ^6.4
This package is not auto-updated.
Last update: 2024-11-16 16:02:16 UTC
README
Use package at https://github.com/EdwinDayot/shorty
Start an application:
<?php $app = new \Shorty\Framework\Application(); $app->run();
Get a response object from Application
:
<?php $app = new \Shorty\Framework\Application(); $response = $app->getResponse();
Add new routes:
<?php $app = new \Shorty\Framework\Application(); $router = $app->getRouter(); $router->get('posts', function () { return 'posts'; }); $app->run();