2017 © Pedro Peláez
 

library application

The core for the Laasti Framework.

image

laasti/application

The core for the Laasti Framework.

  • Thursday, May 5, 2016
  • by nebulousGirl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 262 Installations
  • PHP
  • 3 Dependents
  • 1 Suggesters
  • 0 Forks
  • 2 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Laasti/application

The core of the Laasti framework., (*1)

Maximizes flexibility with the use of standards and callables., (*2)

Provides basic services that any apps need:, (*3)

The core

Dependency Injection with Container Interop

Reserved words: config, response, request, kernel, error_handler Usually used with League/container, (*4)

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., (*5)

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., (*6)

ConsoleCommand/Result (TODO)

Console Kernel takes a command and displays the result, (*7)

Http Stuff, optional packages

A cookie object that you can easily attach to your responses (withHeader('Set-Cookie', (string) $cookie)), (*8)

Routing (TODO)

laasti/route: An elegant wrapper for nikic fast routes, (*9)

Session (TODO)

A simple session handler (defaults to native), (*10)

Commands and command bus (TODO)

chief, (*11)

Database access (TODO)

DBAL, (*12)

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

See CHANGELOG.md for more information., (*13)

Credits

Author: Sonia Marquette (@nebulousGirl), (*14)

License

Released under the MIT License. See LICENSE.txt file., (*15)

The Versions