laasti / application
The core for the Laasti Framework.
Requires
- psr/container: 1.0.0
- psr/http-message: 1.0
- psr/log: ~1.0.0
Requires (Dev)
- hassankhan/config: ~2.1.0
- laasti/peels: dev-master
- laminas/laminas-diactoros: ~2.4.1
- laminas/laminas-httphandlerrunner: ^1.2
- league/booboo: ~2.0
- league/container: ~2.0
- monolog/monolog: ~2.0
- phpunit/phpunit: ^5.7
Suggests
- laasti/peels: A middleware stack for HTTP messages (PSR-2)
- laminas/laminas-diactoros: A HTTP message (PSR-2) implementation
- league/booboo: A flexible error handler package
- league/container: A great, yet simple container compatible with container-interop
- monolog/monolog: A PSR-3 logger, but you already know it
This package is auto-updated.
Last update: 2024-12-29 05:04:38 UTC
README
The core of the Laasti framework.
Maximizes flexibility with the use of standards and callables.
Provides basic services that any apps need:
The core
Dependency Injection with Container Interop
Reserved words: config, response, request, kernel, error_handler Usually used with League/container
Application configuration
- Multiple environments (develop, tests, staging, production...)
- An ArrayAccess implementation or plain array registered to the config container key
Error handling (TODO)
- Reroute exceptions
- Handle exception by types
- Notify exceptions by type
- Manage errors
Logging PSR3
Input/Output
An abstract kernel implementation that takes an input and generate an output using middlewares.
Request/Response
Http Kernel implementation takes a PSR7 ServerRequestInterface and outputs a PSR7 ResponseInterface. The kernel accepts any callable as a runner, the callable will be passed a request and a response.
ConsoleCommand/Result (TODO)
Console Kernel takes a command and displays the result
Http Stuff, optional packages
Psr7 Helpers and Cookie (TODO)
A cookie object that you can easily attach to your responses (withHeader('Set-Cookie', (string) $cookie)
)
Routing (TODO)
laasti/route: An elegant wrapper for nikic fast routes
Session (TODO)
A simple session handler (defaults to native)
Commands and command bus (TODO)
chief
Database access (TODO)
DBAL
Installation
composer require laasti/application
Usage
$config = [ 'routes' => [ ['GET', '/welcome', 'MyControllerClass::welcome'], ], ]; $app = new Laasti\Application\Application(); $app->run(Symfony\Component\HttpFoundation\Request::create('/welcome')); //Outputs
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
See CHANGELOG.md for more information.
Credits
Author: Sonia Marquette (@nebulousGirl)
License
Released under the MIT License. See LICENSE.txt file.